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

Specify library path env var. #56

Merged
merged 4 commits into from
Dec 8, 2021
Merged

Specify library path env var. #56

merged 4 commits into from
Dec 8, 2021

Conversation

ArthurKValladares
Copy link
Contributor

Fixes linking with cc error where cc can't find os libs.

src/apple/cli.rs Outdated
@@ -399,6 +399,7 @@ impl Exec for Input {
let macos_target = Target::macos();

let isysroot = format!("-isysroot {}", sdk_root.display());
let library_path = format!("{}/usr/lib", macos_sdk_root.display());
Copy link
Contributor

Choose a reason for hiding this comment

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

Having this be part of the macos_isysroot expression (binding (macos_isysroot, library_path)) would prevent needing to expose macos_sdk_root; the (pre-existing) large number of bindings derived from each other can make this function difficult to reason about, so being aggressive about constraining that flow is warranted.

src/apple/cli.rs Outdated
format!("-isysroot {}", macos_sdk_root.display())
(
format!("-isysroot {}", macos_sdk_root.display()),
// We need to manually specify a search path to link against the host's libraries for MacOs Big Sur
Copy link
Contributor

Choose a reason for hiding this comment

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

More direct description of why we have this:

Suggested change
// We need to manually specify a search path to link against the host's libraries for MacOs Big Sur
// Prevents linker errors in build scripts and proc macros:

Also, this should be on the LIBRARY_PATH insert instead of here.

@francesca64 francesca64 merged commit 8a0ccfe into BrainiumLLC:master Dec 8, 2021
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.

None yet

2 participants