zig/src
Jakub Konka 317c555a5c Fix linking issues on BigSur
This commit fixes linking issue on macOS 11 BigSur by appending
a prefix path to all lib and framework search paths known as
`-syslibroot`.

The reason this is needed is that in macOS 11, the system libraries
and frameworks are no longer readily available in the filesystem.
Instead, the new macOS ships with a built-in dynamic linker cache
of all system-provided libraries, and hence, when linking with either
`lld.ld64` or `ld64`, it is required to pass in `-syslibroot [dir]`.
The latter can usually be obtained by invoking `xcrun --show-sdk-path`.
With this commit, Zig will do this automatically when compiling natively
on macOS. However, it also provides a flag `-syslibroot` which can be
used to overwrite the automtically populated value.

To summarise, with this change, the user of Zig is not required to
generate and append their own syslibroot path. Standard invocations
such as `zig build-exe hello.zig` or `zig build` for projects will
work out of the box. The only missing bit is `zig cc` and `zig c++`
since the addition of the `-syslibroot` option would be a mismatch
between the values provided by `clang` itself and Zig's wrapper.
2020-11-02 17:06:09 +01:00
..
codegen run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
link Fix linking issues on BigSur 2020-11-02 17:06:09 +01:00
stage1 Merge pull request #6792 from koachan/sparc64-linux 2020-11-01 22:14:56 -05:00
Cache.zig When checking a cache hit, make sure to handle a (re)moved source file 2020-10-23 01:01:37 -04:00
Compilation.zig Fix linking issues on BigSur 2020-11-02 17:06:09 +01:00
DepTokenizer.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
Module.zig stage2: switch comptime execution 2020-10-30 15:58:13 +02:00
Package.zig stage2: implement --pkg-begin and --pkg-end CLI args 2020-09-22 23:00:33 -07:00
RangeSet.zig stage2: implement switch validation for integers 2020-10-30 15:58:13 +02:00
TypedValue.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
astgen.zig stage2: switch put swap condbr and block 2020-10-30 15:58:13 +02:00
clang.zig rename ZigClangFloatingLiteral_getValueAsApproximateDouble 2020-10-27 14:16:43 -07:00
clang_options.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
clang_options_data.zig run update_clang_options on llvm 11 rc6 2020-10-08 16:13:37 -07:00
codegen.zig stage2: switch put swap condbr and block 2020-10-30 15:58:13 +02:00
config.zig.in delete all stage1 c++ code not directly related to compiling stage2 2020-09-17 18:29:38 -07:00
glibc.zig Turn zig fmt back on in various src/ files 2020-10-05 04:48:58 -04:00
introspect.zig stage2: implement using the global cache dir 2020-09-22 14:08:08 -07:00
ir.zig stage2: switch comptime execution 2020-10-30 15:58:13 +02:00
libc_installation.zig add minimal openbsd support 2020-10-11 08:23:36 +00:00
libcxx.zig Merge remote-tracking branch 'origin/master' into llvm11 2020-09-30 02:55:41 -07:00
libunwind.zig stage2: implement -fno-emit-bin 2020-09-26 12:42:07 -07:00
link.zig Fix linking issues on BigSur 2020-11-02 17:06:09 +01:00
liveness.zig stage2: fix typo in liveness; add comptime switch test 2020-10-30 15:58:13 +02:00
llvm.zig stage2: building DLL import lib files 2020-09-28 19:20:58 -07:00
main.zig Fix linking issues on BigSur 2020-11-02 17:06:09 +01:00
mingw.zig stage2: Add missing defines for building dllcrt2.o 2020-10-01 11:39:22 +02:00
musl.zig stage2: building mingw-w64 and COFF LDD linking 2020-09-28 00:06:06 -07:00
print_env.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
print_targets.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
stage1.zig non-hacky workaround for the empty file bug 2020-10-26 16:06:14 -07:00
target.zig Add minimal set of macOS libc headers 2020-10-21 19:45:21 -07:00
test.zig stage2: fix test harness tmp path handling 2020-10-30 15:58:12 +02:00
tracy.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
translate_c.zig translate-c: correctly handle pointers to opaque demoted structs 2020-10-31 09:30:13 +02:00
type.zig stage2: implement switch validation for integers 2020-10-30 15:58:13 +02:00
value.zig stage2: return same hash for different representations of same value 2020-10-30 15:58:13 +02:00
windows_com.hpp compiling on mingw is now supported (#1542) 2018-09-18 00:13:17 -04:00
windows_sdk.cpp fixed mingw compilation 2018-10-27 11:35:01 -04:00
windows_sdk.h fix regressed stage2 test harness 2020-09-21 21:14:01 -07:00
windows_sdk.zig rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00
zig_clang.cpp rename ZigClangFloatingLiteral_getValueAsApproximateDouble 2020-10-27 14:16:43 -07:00
zig_clang.h rename ZigClangFloatingLiteral_getValueAsApproximateDouble 2020-10-27 14:16:43 -07:00
zig_clang_cc1_main.cpp update clang drivers from llvm 10 to 11 2020-07-24 17:01:52 -07:00
zig_clang_cc1as_main.cpp update clang drivers from llvm 10 to 11 2020-07-24 17:01:52 -07:00
zig_clang_driver.cpp update clang drivers from llvm 10 to 11 2020-07-24 17:01:52 -07:00
zig_llvm.cpp stage1: Implement Add/Mul reduction operators 2020-11-01 14:30:31 -07:00
zig_llvm.h stage1: Implement Add/Mul reduction operators 2020-11-01 14:30:31 -07:00
zir.zig stage2: switch liveness analysis 2020-10-30 15:58:13 +02:00
zir_sema.zig stage2: return same hash for different representations of same value 2020-10-30 15:58:13 +02:00