Author: Petr Hosek
Date: 2021-04-29T10:34:37-07:00
New Revision: ba631240ae9ccbf70f57c0ba22cf2dd5a3592da2

URL: 
https://github.com/llvm/llvm-project/commit/ba631240ae9ccbf70f57c0ba22cf2dd5a3592da2
DIFF: 
https://github.com/llvm/llvm-project/commit/ba631240ae9ccbf70f57c0ba22cf2dd5a3592da2.diff

LOG: [CMake] Set correct CXX_FLAGS for relative-vtables variants

We overrite CXX_FLAGS to enable relative vtables, but doing so
overwrites generic Fuchsia CXX_FLAGS leading to a build failure
on Windows.

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

Added: 
    

Modified: 
    clang/cmake/caches/Fuchsia-stage2.cmake

Removed: 
    


################################################################################
diff  --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index a9ac3ce5d9ceb..f83ef1f3ac66b 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -212,16 +212,16 @@ if(FUCHSIA_SDK)
     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} -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} -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} -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 @@ if(FUCHSIA_SDK)
     
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} -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