aboutsummaryrefslogtreecommitdiff
path: root/src/libunwind.zig
AgeCommit message (Collapse)Author
2021-01-11stage2: cleanups regarding red zone CLI flagsAndrew Kelley
* CLI: change to -mred-zone and -mno-red-zone to match gcc/clang. * build.zig: remove the double negative and make it an optional bool. This follows precedent from other flags, allowing the compiler CLI to be the decider of what is default instead of duplicating the default value into the build system code. * Compilation: make it an optional `want_red_zone` instead of a `no_red_zone` bool. The default is decided by a call to `target_util.hasRedZone`. * When creating a Clang command line, put -mred-zone on the command line if we are forcing it to be enabled. * Update update_clang_options.zig with respect to the recent {s}/{} format changes. * `zig cc` integration with red zone preference.
2021-01-11Added support for no red zoneLee Cannon
2020-12-24stage2: re-use compiler runtime libs across opt modes and strip flagAndrew Kelley
Previously Zig would need to recompile runtime libs if you changed the values of --strip or -O. Now, unless the `debug_compiler_runtime_libs` flag is set (which is currently not exposed to the CLI), Zig will always choose ReleaseFast or ReleaseSmall for compiler runtime libraries. When the main application chooses ReleaseFast or ReleaseSmall, that value is propagated to compiler runtime libraries. Otherwise a decision is made based on the target, which is currently ReleaseSmall for freestanding WebAssembly and ReleaseFast for everything else. Ultimately the purpose of this commit is to have Debug and ReleaseSafe builds of applications still get optimized builds of, e.g. libcxx and libunwind, as well as to spend less time unnecessarily rebuilding compiler runtime libraries.
2020-12-24libunwind: fix compile errors and warnings for 32-bit armAndrew Kelley
2020-12-24libunwind: add __gcc_personality_v0 symbolAndrew Kelley
2020-12-24stage2: fix Cache deadlock and build more of TSANAndrew Kelley
* rename is_compiler_rt_or_libc to skip_linker_dependencies and set it to `true` for all sub-Compilations. I believe this resolves the deadlock we were experiencing on Drone CI and on some users' computers. I will remove the CI workaround in a follow-up commit. * enabling TSAN automatically causes the Compilation to link against libc++ even if not requested, because TSAN depends on libc++. * add -fno-rtti flags where appropriate when building TSAN objects. Thanks Firefox317 for pointing this out. * TSAN support: resolve all the undefined symbols. We are still seeing a dependency on __gcc_personality_v0 but will resolve this one in a follow-up commit. * static libs do not try to build libc++ or libc++abi.
2020-12-24WIP start adding support for TSANAndrew Kelley
2020-12-20use kprotty's ThreadPool implementation (v5)Andrew Kelley
2020-12-18std: introduce a thread-local CSPRNG for general useAndrew Kelley
std.crypto.random * cross platform, even freestanding * can't fail. on initialization for some systems requires calling os.getrandom(), in which case there are rare but theoretically possible errors. The code panics in these cases, however the application may choose to override the default seed function and then handle the failure another way. * thread-safe * supports the full Random interface * cryptographically secure * no syscall required to initialize on Linux (AT_RANDOM) * calls arc4random on systems that support it `std.crypto.randomBytes` is removed in favor of `std.crypto.random.bytes`. I moved some of the Random implementations into their own files in the interest of organization. stage2 no longer requires passing a RNG; instead it uses this API. Closes #6704
2020-12-13stage2: link musl dynamically by default if nativeIsaac Freund
If targeting the native OS and the system libc is musl, link against it dynamically by default.
2020-11-22modernize the PIE patch for the latest master branchAndrew Kelley
This is the part of #3960 that has to be rewritten to apply to latest master branch code.
2020-09-26stage2: implement -fno-emit-binAndrew Kelley
we are now passing the cli tests
2020-09-24fix a round of regressions in this branchAndrew Kelley
* Don't try to generate C header files yet since it will only cause a crash saying the feature is unimplemented. * Rename the CLI options for release modes to use the `-O` prefix to match C compiler precedent. Options are now `-ODebug`, `-OReleaseFast`, `-OReleaseSafe`, `-OReleaseSmall`. The optimization mode matches the enum tags of std.builtin.Mode. It is planned to, at some point, rename std.builtin.Mode to std.builtin.OptimizationMode and modify the tags to be lower case to match the style convention. - Update build.zig code to support this new CLI. * update std.zig.binNameAlloc to support an optional Version and update the implementation to correctly deal with dynamic library version suffixes.
2020-09-22stage2: implement using the global cache dirAndrew Kelley
2020-09-21stage2: implement building & linking against libcxx and libcxxabiAndrew Kelley
2020-09-21rename src-self-hosted/ to src/Andrew Kelley