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

[analyzer] Proper handling of multi-target build #3598

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Feb 15, 2022

CodeChecker collects implicit compiler info, such as implicit include
paths, default target, etc. If a compilation_database.json contains
build actions with different target compilations (or different sysroot,
etc.) then the implicit infos of the first action will be applied to
all build actions.
With this patch every build action gets its own implicit info.

@bruntib bruntib added bugfix 🔨 analyzer 📈 Related to the analyze commands (analysis driver) labels Feb 15, 2022
@bruntib bruntib added this to the release 6.19.0 milestone Feb 15, 2022
"--target=" + self.buildaction.target.get(compile_lang,
""))
self.buildaction.target != "":
analyzer_cmd.append("--target=" + self.buildaction.target)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
analyzer_cmd.append("--target=" + self.buildaction.target)
analyzer_cmd.append(f"--target={self.buildaction.target}")

analyzer/codechecker_analyzer/buildlog/log_parser.py Outdated Show resolved Hide resolved
analyzer/codechecker_analyzer/buildlog/log_parser.py Outdated Show resolved Hide resolved
analyzer/codechecker_analyzer/buildlog/log_parser.py Outdated Show resolved Hide resolved
analyzer/codechecker_analyzer/buildlog/log_parser.py Outdated Show resolved Hide resolved
analyzer/codechecker_analyzer/buildlog/log_parser.py Outdated Show resolved Hide resolved
CodeChecker collects implicit compiler info, such as implicit include
paths, default target, etc. If a compilation_database.json contains
build actions with different target compilations (or different sysroot,
etc.) then the implicit infos of the first action will be applied to
all build actions.
With this patch every build action gets its own implicit info.
Copy link
Contributor

@csordasmarton csordasmarton left a comment

Choose a reason for hiding this comment

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

LGTM!

@steakhal
Copy link
Contributor

Looks fine by me as well.

@csordasmarton csordasmarton merged commit f835d00 into Ericsson:master Feb 25, 2022
@bruntib bruntib deleted the multiple_target branch March 4, 2022 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bugfix 🔨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants