mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Merge pull request #2553 from rtfeldman/roc-link-flags
Read ROC_LINK_FLAGS env var to inject more link flags
This commit is contained in:
commit
91169a47f5
1 changed files with 12 additions and 0 deletions
|
@ -850,6 +850,18 @@ fn link_macos(
|
|||
ld_command.arg(format!("-L{}/swift", sdk_path));
|
||||
};
|
||||
|
||||
let roc_link_flags = match env::var("ROC_LINK_FLAGS") {
|
||||
Ok(flags) => {
|
||||
println!("⚠️ CAUTION: The ROC_LINK_FLAGS environment variable is a temporary workaround, and will no longer do anything once surgical linking lands! If you're concerned about what this means for your use case, please ask about it on Zulip.");
|
||||
|
||||
flags
|
||||
}
|
||||
Err(_) => "".to_string(),
|
||||
};
|
||||
for roc_link_flag in roc_link_flags.split_whitespace() {
|
||||
ld_command.arg(roc_link_flag.to_string());
|
||||
}
|
||||
|
||||
ld_command.args(&[
|
||||
// Libraries - see https://github.com/rtfeldman/roc/pull/554#discussion_r496392274
|
||||
// for discussion and further references
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue