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

clang --target compiler arg overridden when attempting to find system defaults #5557

Closed
schultetwin1 opened this issue May 22, 2020 · 4 comments
Assignees
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@schultetwin1
Copy link

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10 19631
  • VS Code Version: 1.45.1

When using the clang compiler, the logic in cpptools.exe to find compiler default defines and include paths finds the wrong information if the compiler arg --target=<some target> is present.

I believe this is because cpptools is overridding the --target argument. I notice that when I pass in the compiler argument --target=aarch64-none-linux-android29, the resulting process to detect system include paths and defines has both --target=aarch64-none-linux-android29 and --target=aarch64-arm-none-eabi. This means the detected defines and include paths will not be Android specific but a generic aarch64 set of includes/defines instead.

Expected behavior
I would expect cpptools to not override the --target argument when that is past in as a compiler arg.

@michelleangela michelleangela added Language Service Feature: Configuration An issue related to configuring the extension or IntelliSense bug labels May 22, 2020
@michelleangela michelleangela added this to the 0.29.0 milestone May 22, 2020
@michelleangela michelleangela self-assigned this May 22, 2020
@Colengms
Copy link
Contributor

There are likely other args that would cause similar issues. i.e. -march, -mcpu

@michelleangela michelleangela added the fixed Check the Milestone for the release in which the fix is or will be available. label May 28, 2020
@sean-mcmanus
Copy link
Contributor

Your fix should be available in https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders now.

@schultetwin1
Copy link
Author

Looks like its working! Feel free to close this out if you'd like.

@michelleangela
Copy link
Contributor

Thanks for verifying. We'll close the issue when 0.29.0 is out of insiders and is released.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

4 participants