Go to file
Dan Liew 9f59704a5d [CMake] Fix the value of `config.target_cflags` for non-macOS Apple
platforms.

The main problem here is that `-*-version_min=` was not being passed to
the compiler when building test cases. This can cause problems when
testing on devices running older OSs because Clang would previously
assume the minimum deployment target is the the latest OS in the SDK
which could be much newer than what the device is running.

Previously the generated value looked like this:

`-arch arm64 -isysroot
<path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`

With this change it now looks like:

`-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot
<path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`

This mirrors the setting of `config.target_cflags` on macOS.

This change is made for ASan, LibFuzzer, TSan, and UBSan.

To implement this a new `get_test_cflags_for_apple_platform()` function
has been added that when given an Apple platform name and architecture
returns a string containing the C compiler flags to use when building
tests. This also calls a new helper function `is_valid_apple_platform()`
that validates Apple platform names.

rdar://problem/50124489

Differential Revision: https://reviews.llvm.org/D58578

llvm-svn: 359305
2019-04-26 13:22:39 +00:00
clang [MinGW] Fix dllexport of explicit template instantiation 2019-04-26 08:09:51 +00:00
clang-tools-extra [clangd] Remove unused ClangdServer::dynamicIndex(). NFC 2019-04-26 09:36:22 +00:00
compiler-rt [CMake] Fix the value of `config.target_cflags` for non-macOS Apple 2019-04-26 13:22:39 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add LLVM-8 build 2019-03-27 21:28:31 +00:00
libcxx Fix r359229 which tried to fix r359159... 2019-04-26 05:04:33 +00:00
libcxxabi Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF 2019-04-25 09:27:50 +00:00
libunwind [NFC] Fix typo in debug log 2019-04-22 15:40:50 +00:00
lld [LLD][ELF] - Do not remove empty sections referenced in LOADADDR/ADDR commands. 2019-04-26 06:59:30 +00:00
lldb [lldb] [lit] Add register read tests for YMM registers (AVX) 2019-04-26 13:21:58 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm Fix llvm-objcopy/ELF/preserve-segment-contents test on UTF-8 locale 2019-04-26 13:09:26 +00:00
openmp Use correct way to test for MIPS arch after rOMP355687 2019-04-22 19:20:46 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly Apply include-what-you-use #include removal suggestions. NFC. 2019-03-28 20:19:49 +00:00
pstl [pstl] Make the default backend be the serial backend and always provide parallel policies 2019-04-24 20:12:36 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Add a reduced copy of the llvm .gitignore 2019-04-09 00:52:49 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.