Skip to content

[test] Fix incorrect usage of swift_obj_root in unified builds #77330

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
merged 1 commit into from
Nov 3, 2024

Conversation

drodriguez
Copy link
Contributor

When doing an unified build (Swift being an external project of LLVM), the Swift build is at <llvm build dir>/tools/swift, and that is the value of swift_obj_root. However many products are actually placed in <llvm build dir>, like bin/, include/ and things like lib/swift/... and others.

A couple of macros tests check the error messages printed by the compiler against swift_obj_root (by the replacement done in PathSanitizingFileCheck of BUILD_DIR) when it should have been checking them against the top-level build directory, which will work in both unified and non-unified builds (like build-script builds).

@drodriguez
Copy link
Contributor Author

@swift-ci please test

@drodriguez drodriguez force-pushed the swift-obj-root-strikes-back branch from 718ec79 to 6ff8c24 Compare November 1, 2024 18:13
@drodriguez
Copy link
Contributor Author

@swift-ci please test

When doing an unified build (Swift being an external project of LLVM),
the Swift build is at `<llvm build dir>/tools/swift`, and that is the
value of `swift_obj_root`. However many products are actually placed in
`<llvm build dir>`, like `bin/`, `include/` and things like
`lib/swift/...` and others.

A couple of macros tests check the error messages printed by the
compiler against `swift_obj_root` (by the replacement done in
`PathSanitizingFileCheck` of `BUILD_DIR`) when it should have been
checking them against the top-level build directory, which will work in
both unified and non-unified builds (like `build-script` builds).
@drodriguez drodriguez force-pushed the swift-obj-root-strikes-back branch from 6ff8c24 to 1e59037 Compare November 1, 2024 18:26
@drodriguez drodriguez requested a review from jckarter as a code owner November 1, 2024 18:26
@drodriguez
Copy link
Contributor Author

@swift-ci please test

@drodriguez drodriguez merged commit 798f0e6 into swiftlang:main Nov 3, 2024
5 checks passed
@drodriguez drodriguez deleted the swift-obj-root-strikes-back branch November 3, 2024 17:05
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