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

Duplicate compiler flags should not be removed #1497

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

Colengms
Copy link
Contributor

It looks like CMake Tools is removing duplicate compiler flags from the browse config. Compiler flags are contextual, so none should be removed.

For example, there are various compiler args that themselves receive the next arg. (i.e. -include, -x, -Xclang, -Xlinker). In my case, multiple -Xclang uses were generated by CMake. -Xclang -gcodeview -Xclang --dependent-lib=msvcrtd. After one of those -Xclang's was removed, cpptools attempted to use the browse config to probe clang.exe with -Xclang -gcodeview --dependent-lib=msvcrtd, resulting in an error that --dependent-lib=msvcrtd was not recognized (as it's only valid after a -Xclang)

This appears to only be a problem with the browse config. Individual custom configs appear to include duplicates.

@Colengms Colengms requested a review from bobbrow October 21, 2020 06:13
@Colengms Colengms changed the title Duplicate compiler flags matter - they should not be removed Duplicate compiler flags should not be removed Oct 21, 2020
@bobbrow bobbrow merged commit fd2a043 into develop Oct 21, 2020
@bobbrow bobbrow deleted the coleng/dont_remove_flags branch October 21, 2020 16:12
@bobbrow bobbrow added this to the 1.5.0 milestone Nov 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants