Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support single quotes in response files #10787

Closed
splhack opened this issue Feb 4, 2022 · 0 comments · Fixed by #10788
Closed

Support single quotes in response files #10787

splhack opened this issue Feb 4, 2022 · 0 comments · Fixed by #10788
Labels
bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. standard library This issue involves writing Zig code for the standard library. zig cc Zig as a drop-in C compiler feature
Milestone

Comments

@splhack
Copy link
Contributor

splhack commented Feb 4, 2022

Zig Version

0.10.0 (64f7231)

Steps to Reproduce

Prepare response files and test C code

argsfile

cat <<EOF > argsfile
'-o'
test
test.c
EOF

argsfile2

cat <<EOF > argsfile2
-o
'te st'
test.c
EOF

test.c

cat <<EOF > test.c
int main() {return 0;}
EOF

Expected Behavior

Verify the response files with gcc or Clang

I did with gcc 8.5.0, but most of the gcc versions and also Clang should work

$ gcc @argsfile; echo $?
0
$ gcc @argsfile2; echo $?
0

Actual Behavior

Test zig cc with the response files

zig version
zig cc @argsfile; echo $?
zig cc @argsfile2; echo $?

result

$ zig version
0.10.0

$ zig cc @argsfile; echo $?
warning: FileNotFound: /tmp/'-o'
error: FileNotFound
1

$ zig cc @argsfile2; echo $?
warning: FileNotFound: /tmp/st'
error: FileNotFound
1

Context

This exact issue was reported in #4833.
I attempted to test it with #9654 that should be merged on to trunk 8a97807

@splhack splhack added the bug Observed behavior contradicts documented or intended behavior label Feb 4, 2022
@Vexu Vexu changed the title Response file support in zig cc Support single quotes in response files Feb 4, 2022
@Vexu Vexu added frontend Tokenization, parsing, AstGen, Sema, and Liveness. standard library This issue involves writing Zig code for the standard library. zig cc Zig as a drop-in C compiler feature labels Feb 4, 2022
@Vexu Vexu added this to the 0.10.0 milestone Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior frontend Tokenization, parsing, AstGen, Sema, and Liveness. standard library This issue involves writing Zig code for the standard library. zig cc Zig as a drop-in C compiler feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants