Skip to content

compileCommands setting does not appear to account for --sysroot/target options #1575

Closed

Description

@imerin
* Ubuntu 16.04
* VS Code version 1.20.1
* C/C++ extension version 0.15.0

I'm cross compiling and using the --sysroot option with gcc. The extension does not seem to account for this when loading the compile_commands.json file. It correctly includes the header paths specified with the -I option to gcc, but does not include the headers in e.g. sysroot/usr/include.

Removing all entries from both includePath and browse.path did not fix this issue.

Adding the sysroot/usr/include directories to includePath gave me the functionality I was expecting from the compileCommands setting

Activity

  1. changed the title [-]compile_commands.json does not appear to account for --sysroot option[/-] [+]compileCommands setting does not appear to account for --sysroot option[/+] on Feb 16, 2018
  2. sean-mcmanus commented on Feb 16, 2018

    @sean-mcmanus
    Contributor

    We should be able to add support for --sysroot for the next update.

  3. sean-mcmanus commented on Apr 4, 2018

    @sean-mcmanus
    Contributor

    We haven't added --sysroot parsing to compile_commands.json yet, but as an alternative you might be able to set the compilerPath and add the --sysroot arg , assuming all your files use the same sysroot arg.

  4. imerin commented on Apr 4, 2018

    @imerin
    Author

    Thanks, that’s what i ended up doing until this is added to the extension.

  5. modified the milestones: April 2018, on Apr 17, 2018
  6. 6 remaining items

  7. sean-mcmanus commented on Mar 14, 2019

    @sean-mcmanus
    Contributor

    Fixing #1755 might fix this too.

  8. abmantis commented on Apr 6, 2020

    @abmantis

    I can also confirm that the isystem paths in compile_commands.json do not take into account the --sysroot param.

  9. added this to the 1.2.0 milestone on Oct 29, 2020
  10. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    on Nov 3, 2020
  11. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    and removed
    fixedCheck the Milestone for the release in which the fix is or will be available.
    on Jan 26, 2021
  12. locked and limited conversation to collaborators on Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions