add -Wno-pragma-pack when targeting windows-gnu

windows.h has files such as pshpack1.h which do #pragma packing,
triggering a clang warning. So for this target, this warning is
disabled.

this commit also improves the error message printed when no libc can be
used, printing the "zig triple" rather than the "llvm triple".
This commit is contained in:
Andrew Kelley
2019-07-11 23:48:13 -04:00
parent b4bbfe8c05
commit d9c4c96bf2
5 changed files with 29 additions and 13 deletions

View File

@@ -982,7 +982,7 @@ int main(int argc, char **argv) {
if (target_requires_pic(&target, have_libc) && want_pic == WantPICDisabled) {
Buf triple_buf = BUF_INIT;
get_target_triple(&triple_buf, &target);
target_triple_zig(&triple_buf, &target);
fprintf(stderr, "`--disable-pic` is incompatible with target '%s'\n", buf_ptr(&triple_buf));
return print_error_usage(arg0);
}