zig/test
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
..
src tests: run-translated-c now respects -Dtarget 2020-12-08 13:46:05 -07:00
stage1 translate-c: support referencing c containers in macros 2020-12-10 14:45:48 +02:00
stage2 stage2: variable shadowing detection (#6969) 2020-12-06 19:36:49 +02:00
standalone fix deadlock with build-exe on an object for windows 2020-12-11 18:34:34 -05:00
assemble_and_link.zig update std lib to new Target API 2020-02-28 14:51:54 -05:00
cli.zig add std.testing.expectStringEndsWith 2020-12-08 21:59:24 -07:00
compare_output.zig test & docs fixups to work with new semantics 2020-03-19 09:53:55 -04:00
compile_errors.zig stage1: Validate the specified cc for lazy fn types 2020-12-08 19:09:25 -05:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig Support casting enums to all int types. 2020-12-10 15:47:56 -05:00
runtime_safety.zig Add some test cases for the previous commits 2020-12-05 20:14:04 +01:00
stack_traces.zig update stack trace test with new start.zig line number 2020-11-25 00:40:50 -07:00
standalone.zig fix deadlock with build-exe on an object for windows 2020-12-11 18:34:34 -05:00
tests.zig tests: run-translated-c now respects -Dtarget 2020-12-08 13:46:05 -07:00
translate_c.zig Support casting enums to all int types. 2020-12-10 15:47:56 -05:00