[libc-commits] [PATCH] D158652: [libc] Only add -ffreestanding flag in full build mode.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 23 13:13:40 PDT 2023


sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/cmake/modules/LLVMLibCTestRules.cmake:167
+    )
+  endif()
   if(LIBC_UNITTEST_COMPILE_OPTIONS)
----------------
A cleaner approach is likely:

```
target_compile_options(
  ${fq_build_target_name}
  PRIVATE -fpie ${LIBC_COMPILE_OPTIONS_DEFAULT})
)
if(LLVM_LIBC_FULL_BUILD)
  target_compile_options(${fq_build_target_name} PRIVATE -ffreestanding)
endif()
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158652/new/

https://reviews.llvm.org/D158652



More information about the libc-commits mailing list