diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py index 5aa6520..60215e9f 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -27,7 +27,7 @@ # 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 = '344066' +CLANG_REVISION = '346388' use_head_revision = bool(os.environ.get('LLVM_FORCE_HEAD_REVISION', '0') in ('1', 'YES')) @@ -781,6 +781,14 @@ 'i686': 'x86', }[target_arch]]) + # NDK r16 "helpfully" installs libc++ as libstdc++ "so the compiler will + # pick it up by default". Only these days, the compiler tries to find + # libc++ instead. See https://crbug.com/902270. + shutil.copy(os.path.join(toolchain_dir, 'sysroot/usr/lib/libstdc++.a'), + os.path.join(toolchain_dir, 'sysroot/usr/lib/libc++.a')) + shutil.copy(os.path.join(toolchain_dir, 'sysroot/usr/lib/libstdc++.so'), + os.path.join(toolchain_dir, 'sysroot/usr/lib/libc++.so')) + # Build compiler-rt runtimes needed for Android in a separate build tree. build_dir = os.path.join(LLVM_BUILD_DIR, 'android-' + target_arch) if not os.path.exists(build_dir):