[libc-commits] [PATCH] D105643: [libc] Don't pass -fpie/-ffreestanding on Windows
Caitlyn Cano via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jul 13 13:40:25 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa16071e409a5: [libc] Don't pass -fpie/-ffreestanding on Windows (authored by caitlyncano).
Changed prior to commit:
https://reviews.llvm.org/D105643?vs=357376&id=358416#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105643/new/
https://reviews.llvm.org/D105643
Files:
libc/cmake/modules/LLVMLibCObjectRules.cmake
Index: libc/cmake/modules/LLVMLibCObjectRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -1,7 +1,11 @@
set(OBJECT_LIBRARY_TARGET_TYPE "OBJECT_LIBRARY")
function(_get_common_compile_options output_var)
- set(${output_var} -fpie ${LLVM_CXX_STD_default} -ffreestanding ${LIBC_COMPILE_OPTIONS_DEFAULT} ${ARGN} PARENT_SCOPE)
+ set(compile_options ${LLVM_CXX_STD_default} ${LIBC_COMPILE_OPTIONS_DEFAULT} ${ARGN})
+ if(NOT ${LIBC_TARGET_OS} STREQUAL "windows")
+ set(compile_options ${compile_options} -fpie -ffreestanding)
+ endif()
+ set(${output_var} ${compile_options} PARENT_SCOPE)
endfunction()
# Rule which is essentially a wrapper over add_library to compile a set of
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105643.358416.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210713/2d8726b9/attachment.bin>
More information about the libc-commits
mailing list