Skip to content

Commit

Permalink
fix(cc): preprocessor doesn't emit bin
Browse files Browse the repository at this point in the history
  • Loading branch information
zhylmzr committed Jul 22, 2024
1 parent 1fc42ed commit a48afe0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/stage3/bin/zig.exe",
"args": [
"build-lib",
"-fsanitize-thread",
"-ODebug",
"-target",
"x86_64-linux",
"-mcpu",
"baseline",
"-Mroot=C:/Users/qemcs/Desktop/bug1/src/root.zig",
"--cache-dir",
"C:/Users/qemcs/Desktop/bug1/.zig-cache",
"--global-cache-dir",
"C:/Users/qemcs/AppData/Local/zig",
"--name",
"bug1",
"-dynamic"
],
"stopAtEntry": false,
"cwd": "C:/Users/qemcs/Desktop/bug1",
"environment": [],
"console": "externalTerminal"
}
]
}
1 change: 1 addition & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,7 @@ fn buildOutputType(
emit_bin = .{ .yes = p };
clang_preprocessor_mode = .yes;
} else {
emit_bin = .no;
clang_preprocessor_mode = .stdout;
}
}
Expand Down

0 comments on commit a48afe0

Please sign in to comment.