[libc-commits] [PATCH] D105643: [libc] Don't pass -fpie/-ffreestanding on Windows
Arthur Eubanks via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jul 8 15:23:06 PDT 2021
aeubanks added inline comments.
================
Comment at: libc/cmake/modules/LLVMLibCObjectRules.cmake:6
+ if(${LIBC_TARGET_OS} STREQUAL "windows")
+ set(${output_var} ${output_var} /Qfreestanding PARENT_SCOPE)
+ else()
----------------
caitlyncano wrote:
> aeubanks wrote:
> > actually I don't see this available in clang-cl or msvc, where did you find this?
> This is the for the Intel compiler and since the Linux flag syntax was the same I figured I could use the Windows equivalent? Not sure (https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/advanced-optimization-options/ffreestanding-qfreestanding.html)
that looks like it only works on the intel C++ compiler, it won't work with msvc or clang which is what we care about on windows
let's try not adding any alternatives for -fpie/-ffreestanding for now on windows
================
Comment at: libc/cmake/modules/LLVMLibCObjectRules.cmake:8
+ else()
+ set(${output_var} ${output_var} -fpie -ffreestanding PARENT_SCOPE)
+ endif()
----------------
nit: spacing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105643/new/
https://reviews.llvm.org/D105643
More information about the libc-commits
mailing list