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}")


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}")
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to