[libc] Don't pass -fpie/-ffreestanding on Windows
authorCaitlyn Cano <caitlyncano@google.com>
Thu, 8 Jul 2021 17:44:10 +0000 (17:44 +0000)
committerCaitlyn Cano <caitlyncano@google.com>
Tue, 13 Jul 2021 20:39:51 +0000 (20:39 +0000)
commita16071e409a55cfc83e59eb738fd6144207dd5d1
tree2b0e9a340af29acd79204bdb78e5f49f38f7b700
parentf990da59c5df840526baeb70bc5b5594fb5599ed
[libc] Don't pass -fpie/-ffreestanding on Windows

The current compile options function hardcodes the -fpie and
-ffreestanding flags, which don't exist on Windows. This patch sets the
compilation flags conditionally based on the OS specifics.

Reviewed By: sivachandra, aeubanks

Differential Revision: https://reviews.llvm.org/D105643
libc/cmake/modules/LLVMLibCObjectRules.cmake