[clang] Enable compilation of compiler runtime for iOS simulator.
This is required to enable ASan and coverage on simulators (and
other tools like UBSan, TSan, ...).
BUG=450379,602649
Review URL: https://codereview.chromium.org/1883723003
Cr-Commit-Position: refs/heads/master@{#387832}
diff --git a/tools/clang/scripts/package.py b/tools/clang/scripts/package.py
index cc4415b..61f4594 100755
--- a/tools/clang/scripts/package.py
+++ b/tools/clang/scripts/package.py
@@ -210,11 +210,12 @@
'lib/libBlinkGCPlugin.' + so_ext,
])
if sys.platform == 'darwin':
- want.extend([# Copy only the OSX (ASan and profile) and iossim (ASan)
- # runtime libraries:
+ want.extend([# Copy only the OSX and iossim (ASan and profile) runtime
+ # libraries:
'lib/clang/*/lib/darwin/*asan_osx*',
'lib/clang/*/lib/darwin/*asan_iossim*',
'lib/clang/*/lib/darwin/*profile_osx*',
+ 'lib/clang/*/lib/darwin/*profile_iossim*',
])
elif sys.platform.startswith('linux'):
# Copy the libstdc++.so.6 we linked Clang against so it can run.
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 4b2d8c3b..d541393 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -657,6 +657,8 @@
compiler_rt_args = base_cmake_args + [
'-DCMAKE_C_FLAGS=' + ' '.join(cflags),
'-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags)]
+ if sys.platform == 'darwin':
+ compiler_rt_args += ['-DCOMPILER_RT_ENABLE_IOS=ON']
if sys.platform != 'win32':
compiler_rt_args += ['-DLLVM_CONFIG_PATH=' +
os.path.join(LLVM_BUILD_DIR, 'bin', 'llvm-config'),