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

Handle double args intact #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Handle double args intact #15

wants to merge 1 commit into from

Conversation

naota
Copy link

@naota naota commented May 30, 2017

Current code join arg like ["-isystem", "/usr/..."] to ["-isystem /usr/..."]. This merging cause clang to fail to parse the path properly.

To reproduce:
$ clang -xc --verbose -c "-isystem /usr" /dev/null
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-pc-linux-gnu
...
clang -cc1 version 4.0.0 based upon LLVM 4.0.0 default target x86_64-pc-linux-gnu
ignoring nonexistent directory " /usr"
...

As shown in the output, it tries to lookup " /usr", instead of "/usr".

Clang-3.8.0 also behave as the same: https://wandbox.org/permlink/Iyxjqbg6tE9Nr5qs

Thus, the commit properly handle such double argument, not joining them with space.

Current code join arg like ["-isystem", "/usr/..."] to ["-isystem /usr/..."]. This merging cause clang to fail to parse the path properly.

To reproduce:
$ clang -xc --verbose -c "-isystem /usr" /dev/null
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-pc-linux-gnu
...
clang -cc1 version 4.0.0 based upon LLVM 4.0.0 default target x86_64-pc-linux-gnu
ignoring nonexistent directory " /usr"
...

As shown in the output, it tries to lookup " /usr", instead of "/usr".

Clang-3.8.0 also behave as the same: https://wandbox.org/permlink/Iyxjqbg6tE9Nr5qs

Thus, the commit properly handle such double argument, not joining them with space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant