Skip to content

[IncludeTree] Do not pass compilation directories #11034

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

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

cachemeifyoucan
Copy link

When using include-tree, all the relative paths references should be turned into absolute path already. There is no need to pass options like -fdebug-compilation-dir for debug info generation as it makes cache hit less likely when two identical compilations where performed with different compilation directories.

When using include-tree, all the relative paths references should be
turned into absolute path already. There is no need to pass options like
`-fdebug-compilation-dir` for debug info generation as it makes cache
hit less likely when two identical compilations where performed with
different compilation directories.
@@ -3332,6 +3332,10 @@ llvm::DIModule *CGDebugInfo::getOrCreateModuleRef(ASTSourceDescriptor Mod,
std::string Remapped = remapDIPath(Path);
StringRef Relative(Remapped);
StringRef CompDir = TheCU->getDirectory();
// If compilation is not empty, return the path as it is.
Copy link
Author

Choose a reason for hiding this comment

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

Note: this can probably go upstream but I can't write a test case for it since it only manifest for a file system that doesn't have current working directory.

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.

1 participant