Commit 0aa05cca authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

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/+/2014904Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735080}
parent 8fbe8c3c
......@@ -499,15 +499,14 @@ config("compiler") {
"-instcombine-lower-dbg-declare=0",
]
if (llvm_force_head_revision) {
# Before Clang 10, lax vector conversions were allowed by default.
# Chromium currently relies on this behavior.
# TODO(crbug.com/1042470): Fix the code and remove this flag.
if (is_win) {
cflags += [ "/clang:-flax-vector-conversions=all" ]
} else if (cros_sdk_version == "") {
cflags += [ "-flax-vector-conversions=all" ]
}
# Before Clang 10, lax vector conversions were allowed by default.
# Chromium currently relies on this behavior.
# TODO(crbug.com/1042470): Fix the code and remove this flag.
if (is_win) {
cflags += [ "-Xclang", "-flax-vector-conversions=all" ]
} else if (!is_chromeos ||
default_toolchain != "//build/toolchain/cros:target") {
cflags += [ "-flax-vector-conversions=all" ]
}
}
......@@ -1540,22 +1539,18 @@ config("default_warnings") {
# TODO(https://crbug.com/1028110): Evaluate and possible enable.
"-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 += [
# TODO(https://crbug.com/995993): Clean up and enable.
"-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,12 +37,7 @@ if (generate_linker_map) {
declare_args() {
if (is_clang) {
# Clang compiler version. Clang files are placed at version-dependent paths.
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"
}
clang_version = "11.0.0"
}
}
......
......@@ -49,7 +49,7 @@ config("inside_blink") {
"-Wno-implicit-int-conversion",
]
if (llvm_force_head_revision) {
if (!is_chromeos || default_toolchain != "//build/toolchain/cros:target") {
cflags += [
"-Wno-enum-enum-conversion",
"-Wno-enum-float-conversion",
......
......@@ -23,17 +23,14 @@ if (current_cpu == "arm" || current_cpu == "arm64") {
}
}
use_x86_x64_optimizations =
(current_cpu == "x86" || current_cpu == "x64") && !is_ios
# TODO(https://crbug.com/1045291): Re-enable once msan bug is fixed, should
# be set to:
# (current_cpu == "x86" || current_cpu == "x64") && !is_ios
use_x86_x64_optimizations = false
config("zlib_adler32_simd_config") {
if (use_x86_x64_optimizations) {
defines = [ "ADLER32_SIMD_SSSE3" ]
if (is_win) {
defines += [ "X86_WINDOWS" ]
} else {
defines += [ "X86_NOT_WINDOWS" ]
}
} else if (use_arm_neon_optimizations) {
defines = [ "ADLER32_SIMD_NEON" ]
}
......@@ -271,6 +268,16 @@ component("zlib") {
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) {
# iOS@ARM is a special case where we always have NEON but don't check
# for crypto extensions.
......
......@@ -35,12 +35,10 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0;
#include <zircon/features.h>
#include <zircon/syscalls.h>
#include <zircon/types.h>
#elif defined(ARMV8_OS_WINDOWS) || defined(X86_WINDOWS)
#elif defined(_MSC_VER)
#include <windows.h>
#elif !defined(_MSC_VER)
#include <pthread.h>
#else
#error cpu_features.c CPU feature detection in not defined for your platform
#include <pthread.h>
#endif
#if !defined(CPU_NO_SIMD) && !defined(ARM_OS_IOS)
......@@ -51,13 +49,17 @@ static void _cpu_check_features(void);
static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT;
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);
#endif
}
#elif defined(ARMV8_OS_WINDOWS) || defined(X86_WINDOWS)
#elif defined(_MSC_VER)
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)
{
#if !defined(CPU_NO_SIMD) && !defined(ARM_OS_IOS)
_cpu_check_features();
#endif
return TRUE;
}
void ZLIB_INTERNAL cpu_check_features(void)
......
......@@ -338,15 +338,6 @@ def main():
default=sys.platform in ('linux2', 'darwin'))
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:
print('--lto-lld requires --bootstrap')
return 1
......@@ -460,6 +451,8 @@ def main():
'-DCOMPILER_RT_USE_LIBCXX=NO',
# Don't run Go bindings tests; PGO makes them confused.
'-DLLVM_INCLUDE_GO_TESTS=OFF',
# TODO(b/148147812) Goma client doesn't handle in-process cc1.
'-DCLANG_SPAWN_CC1=ON',
]
if args.gcc_toolchain:
......
......@@ -39,14 +39,13 @@ import zipfile
# 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
# Reverting problematic clang rolls is safe, though.
CLANG_REVISION = 'c2443155a0fb245c8f17f2c1c72b6ea391e86e81'
CLANG_SVN_REVISION = 'n332890'
CLANG_SUB_REVISION = 1
CLANG_REVISION = 'efb130fc93059bdf02d3a83950ddabc5d119f9de'
CLANG_SVN_REVISION = 'n340158'
CLANG_SUB_REVISION = 2
PACKAGE_VERSION = '%s-%s-%s' % (CLANG_SVN_REVISION, CLANG_REVISION[:8],
CLANG_SUB_REVISION)
# TODO(crbug.com/985289): Bump to 11.0.0 in the next Clang roll.
RELEASE_VERSION = '10.0.0'
RELEASE_VERSION = '11.0.0'
CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE',
......@@ -341,11 +340,6 @@ def main():
help='Verify that clang has the passed-in version.')
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:
print(('update.py --force-local-build is no longer used to build clang; '
'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