Skip to content

[clang][deps][cas] Fix include-tree contents with -working-directory #8367

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

Merged

Conversation

benlangmuir
Copy link

@benlangmuir benlangmuir commented Mar 8, 2024

The first commit is llvm#84525 and will be rebased before merging.


When using -working-directory we were inconsistent about using relativeor absolute paths, which was causing failures to find files in the include-tree filesystem. Now we should be consistently using theabsolute path.

Note: this changes behaviour of things like __FILE__, which would normally have a relative path even with -working-directory. In the future we may want to find a way to preserve the relative paths, but that has been much harder and the current change at fixes the compilation failures.

rdar://116135029

@benlangmuir
Copy link
Author

@swift-ci please test llvm

Copy link

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

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

Only reviewing the last commit in the PR. LGTM

…4525)

Stop overriding -working-directory to CWD during argument parsing, which
should no longer necessary after we set the VFS working directory, and
set FSOpts correctly after parsing arguments so that working-directory
behaves correctly.

(cherry picked from commit 083da46)
After the -working-directory fix, this test needs to use a relative path
for "ReadFiles". Note: This test already used a relative path upstream,
but was modified downstream.
When using -working-directory we were inconsistent about using relative
or absolute paths, which was causing failures to find files in the
include-tree filesystem. Now we should be consistently using the
absolute path.

Note: this changes behaviour of things like __FILE__, which would
normally have a relative path even with -working-directory. In the
future we may want to find a way to preserve the relative paths, but
that has been much harder and the current change at fixes the
compilation failures.

rdar://116135029
@benlangmuir benlangmuir force-pushed the working-directory-include-tree branch from c51aaec to 78e64df Compare March 12, 2024 16:34
@benlangmuir
Copy link
Author

@swift-ci please test llvm

@benlangmuir benlangmuir merged commit c298691 into swiftlang:next Mar 12, 2024
@benlangmuir benlangmuir deleted the working-directory-include-tree branch March 12, 2024 18:01
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.

3 participants