microsoft / microsoft/vscode-cpptools

Platform/Architecture/Compiler agnostic IntelliSense modes

Open
#4,653 9 comments 42 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request Feature: Configuration Feature: IntelliSense Mode Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Hi.

As of #4644 -m32/m64 argument is now being added whenever compiler built-ins are probed. This change however breaks any GCC that does not actually target x86/x64 or certain other platforms that have those command line options available; E.g. ARM/AArch64 are among those that do not have such options.

It is not possible to ignore any unknown command line options (except for -Wno), so e.g. passing some other option thru compilerArgs to easily overcome this issue is not possible. Of course, it's always possible to do a wrapper kludge, which would modify command line arguments and only after that do the actual GCC call, but that's really pushing it too far and would not solve this issue for anyone else except me. I have no idea how Clang behaves on this matter, perhaps it has more relaxed command line argument parsing.

I wonder, if there could be some either some option to specify the command line options ("compilerArgsProbe") which are used for probing for any platform-specific (machine-depedent in GCC lingo) options, or better still, if there would be some other mode ("gcc-other") to inform that the compiler isn't really targetting x86/x64 and just some best effort style is to be expected, instead of completely bailing out and doing nothing.

I see that #4271 has a similar type of request (arm/arm64 intellSenseMode), and now after the change mentioned above that would do the job, too.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how compiler built-ins are probed and where -m32/-m64 is added, then review the related changes in #4644 and the ARM/ARM64 request in #4271. Determine how IntelliSense modes and compiler arguments are configured. Done means non-x86 GCC targets can probe successfully without invalid architecture flags and have an appropriate mode or configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
compilers, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.