[PATCH] D101551: [CMake] Set correct CXX_FLAGS for relative-vtables variants
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 29 10:22:39 PDT 2021
phosek created this revision.
phosek added a reviewer: leonardchan.
Herald added a subscriber: mgorny.
phosek requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
We overrite CXX_FLAGS to enable relative vtables, but doing so
overwrites generic Fuchsia CXX_FLAGS leading to a build failure
on Windows.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101551
Files:
clang/cmake/caches/Fuchsia-stage2.cmake
Index: clang/cmake/caches/Fuchsia-stage2.cmake
===================================================================
--- clang/cmake/caches/Fuchsia-stage2.cmake
+++ clang/cmake/caches/Fuchsia-stage2.cmake
@@ -212,16 +212,16 @@
set(RUNTIMES_${target}+asan+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_${target}+relative-vtables_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
- set(RUNTIMES_${target}+relative-vtables_CMAKE_CXX_FLAGS "${RUNTIMES_${target}+relative-vtables_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
+ set(RUNTIMES_${target}+relative-vtables_CMAKE_CXX_FLAGS "${FUCHSIA_${target}_COMPILER_FLAGS} ${RUNTIMES_${target}+relative-vtables_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
set(RUNTIMES_${target}+relative-vtables+asan_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
set(RUNTIMES_${target}+relative-vtables+asan_LLVM_USE_SANITIZER "Address" CACHE STRING "")
set(RUNTIMES_${target}+relative-vtables+asan_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
set(RUNTIMES_${target}+relative-vtables+asan_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
- set(RUNTIMES_${target}+relative-vtables+asan_CMAKE_CXX_FLAGS "${RUNTIMES_${target}+relative-vtables+asan_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
+ set(RUNTIMES_${target}+relative-vtables+asan_CMAKE_CXX_FLAGS "${FUCHSIA_${target}_COMPILER_FLAGS} ${RUNTIMES_${target}+relative-vtables+asan_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
set(RUNTIMES_${target}+relative-vtables+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
- set(RUNTIMES_${target}+relative-vtables+noexcept_CMAKE_CXX_FLAGS "${RUNTIMES_${target}+relative-vtables+noexcept_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
+ set(RUNTIMES_${target}+relative-vtables+noexcept_CMAKE_CXX_FLAGS "${FUCHSIA_${target}_COMPILER_FLAGS} ${RUNTIMES_${target}+relative-vtables+noexcept_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
set(RUNTIMES_${target}+relative-vtables+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_${target}+relative-vtables+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
@@ -231,7 +231,7 @@
set(RUNTIMES_${target}+relative-vtables+asan+noexcept_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
set(RUNTIMES_${target}+relative-vtables+asan+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_${target}+relative-vtables+asan+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
- set(RUNTIMES_${target}+relative-vtables+asan+noexcept_CMAKE_CXX_FLAGS "${RUNTIMES_${target}+relative-vtables+asan+noexcept_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
+ set(RUNTIMES_${target}+relative-vtables+asan+noexcept_CMAKE_CXX_FLAGS "${FUCHSIA_${target}_COMPILER_FLAGS} ${RUNTIMES_${target}+relative-vtables+asan+noexcept_CMAKE_CXX_FLAGS} -Xclang -fexperimental-relative-c++-abi-vtables" CACHE STRING "")
# Use .build-id link.
list(APPEND RUNTIME_BUILD_ID_LINK "${target}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101551.341569.patch
Type: text/x-patch
Size: 3249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210429/bb812cf6/attachment-0001.bin>
More information about the cfe-commits
mailing list