You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request:
It appears compilerPath currently only supports an absolute path to the compiler.
Please add the ability to specify a path relative to ${workspaceRoot}.
I would like this too, but I need a bit more than just the compiler path.
Starting the string with e.g. ${workspaceRoot} to get to the clang binary works ok, but I also need to specify --sysroot and --target to get correct behavior.
I would like for these settings to be split out a bit more:
minimally compilerPath: support repeated replacement of ${workspaceFolder} (this would enable me to make this work for e.g. a Zircon checkout).
consider adding "target" and "sysroot" as specific options in clang configuration.
We've added the ability to use ${workspaceRoot}, ${workspaceFolder}, or ${vcpkgRoot} variables in the compilerPath for the next release...using ".." also works with those.
James Tucker (@raggi) The sysroot/target in compile commands is being tracked in #1575 . The current workaround is to add the sysroot and target options to the compilerPath, which should work unless you have files that use different settings.
Activity
sean-mcmanus commentedon May 11, 2018
Should be easy to add.
ai-chen2050 commentedon May 12, 2018
you could temp to add ""${workspaceRoot}"", maybe it will work !
raggi commentedon Jul 3, 2018
I would like this too, but I need a bit more than just the compiler path.
Starting the string with e.g. ${workspaceRoot} to get to the clang binary works ok, but I also need to specify --sysroot and --target to get correct behavior.
I would like for these settings to be split out a bit more:
${workspaceFolder}(this would enable me to make this work for e.g. a Zircon checkout).Example setting for me:
{ "compilerPath": "${workspaceFolder}/zircon/prebuilt/downloads/clang/bin/clang++ --sysroot=${workspaceFolder}/out/build-zircon/build-x64/sysroot --target=x86_64-fuchsia", }In my working version of the above setting, I have to hardcode the --sysroot path to my workspace folder.
In the ideal case I would be able to parameterize out the x64 and x86_64 parts too.
sean-mcmanus commentedon Aug 10, 2018
We've added the ability to use ${workspaceRoot}, ${workspaceFolder}, or ${vcpkgRoot} variables in the compilerPath for the next release...using ".." also works with those.
James Tucker (@raggi) The sysroot/target in compile commands is being tracked in #1575 . The current workaround is to add the sysroot and target options to the compilerPath, which should work unless you have files that use different settings.
sean-mcmanus commentedon Aug 13, 2018
We're using #2397 to track enabling relative paths without explicitly using ${workspaceFolder}.
sean-mcmanus commentedon Aug 17, 2018
Fixed with 0.18.0 (requires usage of ${workspaceFolder}).