Skip to content

[build] Add an rpath of $ORIGIN. #120

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
May 31, 2016
Merged

Conversation

ddunbar
Copy link
Contributor

@ddunbar ddunbar commented May 31, 2016

  • This allows XCTest to find Foundation adjacent to itself, and fixes runtime
    linker problems when using Gold, which automatically uses DT_RUNPATH instead
    of DT_RPATH and so no longer inherits the search path into the Swift runtime
    libraries location used at build time on the client (which swiftc currently
    automatically injects).
  • Fixes SR-1631.

 - This allows XCTest to find Foundation adjacent to itself, and fixes runtime
   linker problems when using Gold, which automatically uses DT_RUNPATH instead
   of DT_RPATH and so no longer inherits the search path into the Swift runtime
   libraries location used at build time on the client (which `swiftc` currently
   automatically injects).

 - Fixes SR-1631.
@ddunbar
Copy link
Contributor Author

ddunbar commented May 31, 2016

/cc @gribozavr

@ddunbar
Copy link
Contributor Author

ddunbar commented May 31, 2016

@swift-ci please test and merge

@gribozavr
Copy link
Contributor

LGTM

@gribozavr
Copy link
Contributor

@swift-ci Please test

@modocache
Copy link
Contributor

Should this also remove the code added in #118, which was a workaround for this issue?

@ddunbar
Copy link
Contributor Author

ddunbar commented May 31, 2016

I don't think so, because at test time in the build root, libXCTest.so is not adjacent to libFoundation.so, so $ORIGIN won't work.

If, however, we move to a toolchain based development model where XCTest is built against a synthesized toolchain, and it also installs libXCTest.so into that so that the built toolchain looks like an installed one, then I think we can get rid of it.

@ddunbar
Copy link
Contributor Author

ddunbar commented May 31, 2016

@swift-ci please test and merge

@ddunbar
Copy link
Contributor Author

ddunbar commented May 31, 2016

@swift-ci please test

@ddunbar
Copy link
Contributor Author

ddunbar commented May 31, 2016

Linux passed, which is what matters; the OS X failure appears unrelated.

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