Commit ec2aab7d authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Revert "Roll clang n333938-3a6da112-1 : n340158-efb130fc-2."

This reverts commit 0aa05cca.

Reason for revert:
This broke arm64-builder-rel and some other builders, see bug.

Original change's description:
> Roll clang n333938-3a6da112-1 : n340158-efb130fc-2.
> 
> Ran `tools/clang/scripts/upload_revision.py efb130fc93059bdf02d3a83950ddabc5d119f9de`.
> 
> This increases the clang version from 10 to 11.
> 
> It also disables the use of vector instructions in zlib to work around
> new false positives in msan (see crbug.com/1045291).
> 
> Bug: 1030664
> Change-Id: I5417d3063f0d67a61cdf31141b05a51a56e84482
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014904
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#735080}

TBR=thakis@chromium.org,hans@chromium.org

Change-Id: I48754484c26ebf6b1f0b4a47c82fe3c74ee39837
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1030664,1045592
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2020785Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735124}
parent 3ad85215
...@@ -499,14 +499,15 @@ config("compiler") { ...@@ -499,14 +499,15 @@ config("compiler") {
"-instcombine-lower-dbg-declare=0", "-instcombine-lower-dbg-declare=0",
] ]
# Before Clang 10, lax vector conversions were allowed by default. if (llvm_force_head_revision) {
# Chromium currently relies on this behavior. # Before Clang 10, lax vector conversions were allowed by default.
# TODO(crbug.com/1042470): Fix the code and remove this flag. # Chromium currently relies on this behavior.
if (is_win) { # TODO(crbug.com/1042470): Fix the code and remove this flag.
cflags += [ "-Xclang", "-flax-vector-conversions=all" ] if (is_win) {
} else if (!is_chromeos || cflags += [ "/clang:-flax-vector-conversions=all" ]
default_toolchain != "//build/toolchain/cros:target") { } else if (cros_sdk_version == "") {
cflags += [ "-flax-vector-conversions=all" ] cflags += [ "-flax-vector-conversions=all" ]
}
} }
} }
...@@ -1539,18 +1540,22 @@ config("default_warnings") { ...@@ -1539,18 +1540,22 @@ config("default_warnings") {
# TODO(https://crbug.com/1028110): Evaluate and possible enable. # TODO(https://crbug.com/1028110): Evaluate and possible enable.
"-Wno-deprecated-copy", "-Wno-deprecated-copy",
# TODO(https://crbug.com/1031169): Clean up and enable.
"-Wno-misleading-indentation",
# TODO(https://crbug.com/1039697): Evaluate and possibly enable.
"-Wno-range-loop-analysis",
] ]
cflags_c += [ cflags_c += [
# TODO(https://crbug.com/995993): Clean up and enable. # TODO(https://crbug.com/995993): Clean up and enable.
"-Wno-implicit-fallthrough", "-Wno-implicit-fallthrough",
] ]
if (llvm_force_head_revision) {
cflags += [
# TODO(https://crbug.com/1031169): Clean up and enable.
"-Wno-misleading-indentation",
# TODO(https://crbug.com/1039697): Evaluate and possibly enable.
"-Wno-range-loop-analysis",
]
}
} }
} }
} }
......
...@@ -37,7 +37,12 @@ if (generate_linker_map) { ...@@ -37,7 +37,12 @@ if (generate_linker_map) {
declare_args() { declare_args() {
if (is_clang) { if (is_clang) {
# Clang compiler version. Clang files are placed at version-dependent paths. # Clang compiler version. Clang files are placed at version-dependent paths.
clang_version = "11.0.0" if (llvm_force_head_revision) {
clang_version = "11.0.0"
} else {
# TODO(crbug.com/1042192): Remove in the next Clang roll.
clang_version = "10.0.0"
}
} }
} }
......
...@@ -49,7 +49,7 @@ config("inside_blink") { ...@@ -49,7 +49,7 @@ config("inside_blink") {
"-Wno-implicit-int-conversion", "-Wno-implicit-int-conversion",
] ]
if (!is_chromeos || default_toolchain != "//build/toolchain/cros:target") { if (llvm_force_head_revision) {
cflags += [ cflags += [
"-Wno-enum-enum-conversion", "-Wno-enum-enum-conversion",
"-Wno-enum-float-conversion", "-Wno-enum-float-conversion",
......
...@@ -23,14 +23,17 @@ if (current_cpu == "arm" || current_cpu == "arm64") { ...@@ -23,14 +23,17 @@ if (current_cpu == "arm" || current_cpu == "arm64") {
} }
} }
# TODO(https://crbug.com/1045291): Re-enable once msan bug is fixed, should use_x86_x64_optimizations =
# be set to: (current_cpu == "x86" || current_cpu == "x64") && !is_ios
# (current_cpu == "x86" || current_cpu == "x64") && !is_ios
use_x86_x64_optimizations = false
config("zlib_adler32_simd_config") { config("zlib_adler32_simd_config") {
if (use_x86_x64_optimizations) { if (use_x86_x64_optimizations) {
defines = [ "ADLER32_SIMD_SSSE3" ] defines = [ "ADLER32_SIMD_SSSE3" ]
if (is_win) {
defines += [ "X86_WINDOWS" ]
} else {
defines += [ "X86_NOT_WINDOWS" ]
}
} else if (use_arm_neon_optimizations) { } else if (use_arm_neon_optimizations) {
defines = [ "ADLER32_SIMD_NEON" ] defines = [ "ADLER32_SIMD_NEON" ]
} }
...@@ -268,16 +271,6 @@ component("zlib") { ...@@ -268,16 +271,6 @@ component("zlib") {
defines += [ "CPU_NO_SIMD" ] defines += [ "CPU_NO_SIMD" ]
} }
# For cpu_features.c
# TODO(https://crbug.com/1045291): Check use_x86_x64_optimizations instead.
if ((current_cpu == "x86" || current_cpu == "x64") && !is_ios) {
if (is_win) {
defines += [ "X86_WINDOWS" ]
} else {
defines += [ "X86_NOT_WINDOWS" ]
}
}
if (is_ios) { if (is_ios) {
# iOS@ARM is a special case where we always have NEON but don't check # iOS@ARM is a special case where we always have NEON but don't check
# for crypto extensions. # for crypto extensions.
......
...@@ -35,10 +35,12 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; ...@@ -35,10 +35,12 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0;
#include <zircon/features.h> #include <zircon/features.h>
#include <zircon/syscalls.h> #include <zircon/syscalls.h>
#include <zircon/types.h> #include <zircon/types.h>
#elif defined(_MSC_VER) #elif defined(ARMV8_OS_WINDOWS) || defined(X86_WINDOWS)
#include <windows.h> #include <windows.h>
#else #elif !defined(_MSC_VER)
#include <pthread.h> #include <pthread.h>
#else
#error cpu_features.c CPU feature detection in not defined for your platform
#endif #endif
#if !defined(CPU_NO_SIMD) && !defined(ARM_OS_IOS) #if !defined(CPU_NO_SIMD) && !defined(ARM_OS_IOS)
...@@ -49,17 +51,13 @@ static void _cpu_check_features(void); ...@@ -49,17 +51,13 @@ static void _cpu_check_features(void);
static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT;
void ZLIB_INTERNAL cpu_check_features(void) void ZLIB_INTERNAL cpu_check_features(void)
{ {
#if !defined(CPU_NO_SIMD) && !defined(ARM_OS_IOS)
pthread_once(&cpu_check_inited_once, _cpu_check_features); pthread_once(&cpu_check_inited_once, _cpu_check_features);
#endif
} }
#elif defined(_MSC_VER) #elif defined(ARMV8_OS_WINDOWS) || defined(X86_WINDOWS)
static INIT_ONCE cpu_check_inited_once = INIT_ONCE_STATIC_INIT; static INIT_ONCE cpu_check_inited_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK _cpu_check_features_forwarder(PINIT_ONCE once, PVOID param, PVOID* context) static BOOL CALLBACK _cpu_check_features_forwarder(PINIT_ONCE once, PVOID param, PVOID* context)
{ {
#if !defined(CPU_NO_SIMD) && !defined(ARM_OS_IOS)
_cpu_check_features(); _cpu_check_features();
#endif
return TRUE; return TRUE;
} }
void ZLIB_INTERNAL cpu_check_features(void) void ZLIB_INTERNAL cpu_check_features(void)
......
...@@ -338,6 +338,15 @@ def main(): ...@@ -338,6 +338,15 @@ def main():
default=sys.platform in ('linux2', 'darwin')) default=sys.platform in ('linux2', 'darwin'))
args = parser.parse_args() args = parser.parse_args()
# TODO(crbug.com/1042192): Remove in the next Clang roll.
if args.llvm_force_head_revision:
global RELEASE_VERSION
RELEASE_VERSION = '11.0.0'
old_lib_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', '10.0.0')
if (os.path.isdir(old_lib_dir)):
print('Removing old lib dir: ' + old_lib_dir)
RmTree(old_lib_dir)
if args.lto_lld and not args.bootstrap: if args.lto_lld and not args.bootstrap:
print('--lto-lld requires --bootstrap') print('--lto-lld requires --bootstrap')
return 1 return 1
...@@ -451,8 +460,6 @@ def main(): ...@@ -451,8 +460,6 @@ def main():
'-DCOMPILER_RT_USE_LIBCXX=NO', '-DCOMPILER_RT_USE_LIBCXX=NO',
# Don't run Go bindings tests; PGO makes them confused. # Don't run Go bindings tests; PGO makes them confused.
'-DLLVM_INCLUDE_GO_TESTS=OFF', '-DLLVM_INCLUDE_GO_TESTS=OFF',
# TODO(b/148147812) Goma client doesn't handle in-process cc1.
'-DCLANG_SPAWN_CC1=ON',
] ]
if args.gcc_toolchain: if args.gcc_toolchain:
......
...@@ -39,13 +39,14 @@ import zipfile ...@@ -39,13 +39,14 @@ import zipfile
# Do NOT CHANGE this if you don't know what you're doing -- see # Do NOT CHANGE this if you don't know what you're doing -- see
# https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md
# Reverting problematic clang rolls is safe, though. # Reverting problematic clang rolls is safe, though.
CLANG_REVISION = 'efb130fc93059bdf02d3a83950ddabc5d119f9de' CLANG_REVISION = 'c2443155a0fb245c8f17f2c1c72b6ea391e86e81'
CLANG_SVN_REVISION = 'n340158' CLANG_SVN_REVISION = 'n332890'
CLANG_SUB_REVISION = 2 CLANG_SUB_REVISION = 1
PACKAGE_VERSION = '%s-%s-%s' % (CLANG_SVN_REVISION, CLANG_REVISION[:8], PACKAGE_VERSION = '%s-%s-%s' % (CLANG_SVN_REVISION, CLANG_REVISION[:8],
CLANG_SUB_REVISION) CLANG_SUB_REVISION)
RELEASE_VERSION = '11.0.0' # TODO(crbug.com/985289): Bump to 11.0.0 in the next Clang roll.
RELEASE_VERSION = '10.0.0'
CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE', CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE',
...@@ -340,6 +341,11 @@ def main(): ...@@ -340,6 +341,11 @@ def main():
help='Verify that clang has the passed-in version.') help='Verify that clang has the passed-in version.')
args = parser.parse_args() args = parser.parse_args()
# TODO(crbug.com/1042192): Remove in the next Clang roll.
if args.llvm_force_head_revision:
global RELEASE_VERSION
RELEASE_VERSION = '11.0.0'
if args.force_local_build: if args.force_local_build:
print(('update.py --force-local-build is no longer used to build clang; ' print(('update.py --force-local-build is no longer used to build clang; '
'use build.py instead.')) 'use build.py instead.'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment