zig/test/standalone
Andrew Kelley c4f53d1ef6 fix deadlock with build-exe on an object for windows
The steps to repro this issue are:

zig build-obj hello.zig -target x86_64-windows-msvc
zig build-exe hello.obj -target x86_64-windows-msvc --subsystem console
-lkernel32 -lntdll

What was happening is that the main Compilation added a work item to
produce kernel32.lib. Then it added a sub-Compilation to build zig's
libc, which ended up calling a function with extern "kernel32", which
caused the sub-Compilation to also try to produce kernel32.lib. The main
Compilation and sub-Compilation do not coordinate about the set of
import libraries that they will be trying to build, so this caused a
deadlock.

This commit solves the problem by disabling the extern "foo" feature
from working when building compiler_rt or libc. Zig's linker code is now
responsible for putting the appropriate import libs on the linker line,
if any for compiler_rt and libc.

Related: #5825
2020-12-11 18:34:34 -05:00
..
brace_expansion remove deprecated uses of ArrayList.span 2020-11-07 11:15:44 +00:00
cat stage2: fix not detecting all dynamic libraries 2020-11-30 20:25:28 -07:00
empty_env Promoted "leak_count_allocator" to the main testing.allocator 2020-01-29 22:22:00 -06:00
global_linkage disallow extern variables with initializers 2020-08-20 11:35:33 +03:00
guess_number Use writer in benchmarks 2020-06-25 19:07:25 -04:00
hello_world breaking: std.os read/write functions + sendfile 2020-03-03 02:25:26 -05:00
issue_339 New Zig formal grammar (#1685) 2018-11-13 05:08:37 -08:00
issue_794 std.debug.assert: remove special case for test builds 2019-02-08 18:23:38 -05:00
issue_5825 fix deadlock with build-exe on an object for windows 2020-12-11 18:34:34 -05:00
issue_7030 Add minimal standalone test case 2020-12-04 12:43:58 +01:00
load_dynamic_library Promoted "leak_count_allocator" to the main testing.allocator 2020-01-29 22:22:00 -06:00
main_pkg_path compile error for import outside package path 2019-03-02 10:38:27 -05:00
main_return_error zig fmt 2020-05-05 05:55:25 -06:00
mix_o_files "generate .h files" feature is no longer supported in stage1 2020-03-20 18:33:36 -04:00
pkg_import breaking changes to zig build API and improved caching 2019-03-08 23:23:11 -05:00
shared_library stage2: fix not detecting all dynamic libraries 2020-11-30 20:25:28 -07:00
static_c_lib Merge remote-tracking branch 'origin/master' into remove-array-type-coercion 2019-12-01 09:56:01 -05:00
use_alias change debug.assert to testing.expect in tests 2020-11-06 22:48:54 +01:00