Skip to content

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

@schultetwin1

Description

@schultetwin1

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.

Metadata

Metadata

Assignees

Labels

Feature: ConfigurationAn issue related to configuring the extension or IntelliSenseLanguage ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions