[PATCH] D138855: [clang][Fuchsia] Allow for setting the default build type

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 12:35:27 PST 2022


leonardchan created this revision.
leonardchan added a reviewer: phosek.
leonardchan added a project: clang.
Herald added a subscriber: abrachet.
Herald added a project: All.
leonardchan requested review of this revision.

Prior to this, `CMAKE_BUILD_TYPE` would unconditionally be `Release`. This allows me to add `-DCMAKE_BUILD_TYPE=Debug` to override this rather than manually changing the cache file.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138855

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
@@ -40,7 +40,10 @@
 set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "")
 set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")
 
-set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+if (NOT DEFINED CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+endif()
+
 if (APPLE)
   set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "")
 elseif(WIN32)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138855.478331.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221128/8f01915c/attachment.bin>


More information about the cfe-commits mailing list