diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-25 14:11:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-25 14:11:54 -0500 |
| commit | 6003b1ea7018fe6a7aa87622d1178e444e6d8abb (patch) | |
| tree | f87768be86d630511e694ebd09173057c7b88a58 /src/target.cpp | |
| parent | e5d4862e145c38ffc1111ee578ddcafc1e35ad57 (diff) | |
| parent | 0d4db8828a9efc05b5c3622098a8337de0b62d1e (diff) | |
| download | zig-6003b1ea7018fe6a7aa87622d1178e444e6d8abb.tar.gz zig-6003b1ea7018fe6a7aa87622d1178e444e6d8abb.zip | |
Merge pull request #2005 from ziglang/c-source
first class support for compiling C code
Diffstat (limited to 'src/target.cpp')
| -rw-r--r-- | src/target.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target.cpp b/src/target.cpp index 01e8b90cea..49a1742945 100644 --- a/src/target.cpp +++ b/src/target.cpp @@ -1049,3 +1049,9 @@ bool target_requires_libc(const ZigTarget *target) { // since this is the stable syscall interface. return (target_is_darwin(target) || target->os == OsFreeBSD || target->os == OsNetBSD); } + +bool target_supports_fpic(const ZigTarget *target) { + // This is not whether the target supports Position Independent Code, but whether the -fPIC + // C compiler argument is valid. + return target->os != OsWindows; +} |
