| author | |
| committer | |
| log | cd078c518fb2835da6ce70b0fc9ec2ded5ebaeae |
| tree | 64dce35cfdc702f5e4903ebe4425bb94333b7363 |
| parent | ceebcfa317874ea6cf0cab55cfc12ec60078273d |
2 files changed, 17 insertions(+), 2 deletions(-)
src/zig_clang_driver.cpp+9-1| ... | ... | @@ -338,7 +338,15 @@ static int ExecuteCC1Tool(SmallVectorImpl<const char *> &ArgV) { |
| 338 | 338 | extern "C" int ZigClang_main(int argc_, const char **argv_); |
| 339 | 339 | int ZigClang_main(int argc_, const char **argv_) { |
| 340 | 340 | noteBottomOfStack(); |
| 341 | llvm::InitLLVM X(argc_, argv_); | |
| 341 | ||
| 342 | // ZIG MOD: On windows, InitLLVM calls GetCommandLineW(), | |
| 343 | // and overwrites the args. We don't want it to do that, | |
| 344 | // and we also don't need the signal handlers it installs | |
| 345 | // (we have our own already), so we just use llvm_shutdown_obj | |
| 346 | // instead. | |
| 347 | // llvm::InitLLVM X(argc_, argv_); | |
| 348 | llvm::llvm_shutdown_obj X; | |
| 349 | ||
| 342 | 350 | llvm::setBugReportMsg("PLEASE submit a bug report to " BUG_REPORT_URL |
| 343 | 351 | " and include the crash backtrace, preprocessed " |
| 344 | 352 | "source, and associated run script.\n"); |
src/zig_llvm-ar.cpp+8-1| ... | ... | @@ -1522,7 +1522,14 @@ static int ranlib_main(int argc, char **argv) { |
| 1522 | 1522 | |
| 1523 | 1523 | extern "C" int ZigLlvmAr_main(int argc, char **argv); |
| 1524 | 1524 | int ZigLlvmAr_main(int argc, char **argv) { |
| 1525 | InitLLVM X(argc, argv); | |
| 1525 | // ZIG MOD: On windows, InitLLVM calls GetCommandLineW(), | |
| 1526 | // and overwrites the args. We don't want it to do that, | |
| 1527 | // and we also don't need the signal handlers it installs | |
| 1528 | // (we have our own already), so we just use llvm_shutdown_obj | |
| 1529 | // instead. | |
| 1530 | // InitLLVM X(argc, argv); | |
| 1531 | llvm::llvm_shutdown_obj X; | |
| 1532 | ||
| 1526 | 1533 | ToolName = argv[0]; |
| 1527 | 1534 | |
| 1528 | 1535 | llvm::InitializeAllTargetInfos(); |