Skip to content

Conversation

@Danil42Russia
Copy link
Contributor

No description provided.

Copy link

@mkornaukhov mkornaukhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write an description or explanation?

Comment on lines +125 to +126
cxxCmdLine = append(cxxCmdLine, cxxArgs...)
cxxCmdLine = append(cxxCmdLine, "-Wp,-v", "-x", "c++", "/dev/null", "-fsyntax-only")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be replaced?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And for what and why?

objOutFile string // output file as specified in cmd line (.o for compilation, .gch/.pch for pch generation)
cxxName string // g++ / clang / etc.
cxxArgs []string // args like -Wall, -fpch-preprocess and many more, except:
cxxArgsIncludes []string // TODO

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO mark is present but not explained

@Danil42Russia Danil42Russia requested a review from troy4eg April 21, 2025 16:56
cxxArgsIncludes: make([]string, 0, 1),
cxxIDirs: MakeIncludeDirs(),
summary: MakeInvocationSummary(),
includesCache: nil, // TODO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

invocation.cxxArgs = append(invocation.cxxArgs, "-Xclang", xArg)
i++
continue
} else if strings.HasPrefix(arg, "-stdlib=") {
Copy link
Contributor

@troy4eg troy4eg Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from clang docs: -stdlib=<arg>, --stdlib=<arg>, --stdlib <arg>
from gcc docs: -stdlib=libstdc++,libc++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants