mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Remove --link option from CLI
This commit is contained in:
parent
e86fd9e879
commit
a836570a7b
@ -40,7 +40,6 @@ pub const FLAG_LIB: &str = "lib";
|
||||
pub const FLAG_NO_LINK: &str = "no-link";
|
||||
pub const FLAG_TARGET: &str = "target";
|
||||
pub const FLAG_TIME: &str = "time";
|
||||
pub const FLAG_LINK: &str = "roc-linker";
|
||||
pub const FLAG_LINKER: &str = "linker";
|
||||
pub const FLAG_PRECOMPILED: &str = "precompiled-host";
|
||||
pub const FLAG_VALGRIND: &str = "valgrind";
|
||||
@ -113,12 +112,6 @@ pub fn build_app<'a>() -> Command<'a> {
|
||||
.help("Prints detailed compilation time information.")
|
||||
.required(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::new(FLAG_LINK)
|
||||
.long(FLAG_LINK)
|
||||
.help("Deprecated in favor of --linker")
|
||||
.required(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::new(FLAG_LINKER)
|
||||
.long(FLAG_LINKER)
|
||||
@ -226,12 +219,6 @@ pub fn build_app<'a>() -> Command<'a> {
|
||||
.help("Prints detailed compilation time information.")
|
||||
.required(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::new(FLAG_LINK)
|
||||
.long(FLAG_LINK)
|
||||
.help("Deprecated in favor of --linker")
|
||||
.required(false),
|
||||
)
|
||||
.arg(
|
||||
Arg::new(FLAG_LINKER)
|
||||
.long(FLAG_LINKER)
|
||||
@ -331,12 +318,6 @@ pub fn build(matches: &ArgMatches, config: BuildConfig) -> io::Result<i32> {
|
||||
(false, false) => LinkType::Executable,
|
||||
};
|
||||
|
||||
// TODO remove FLAG_LINK from the code base anytime after the end of May 2022
|
||||
if matches.is_present(FLAG_LINK) {
|
||||
eprintln!("ERROR: The --roc-linker flag has been deprecated because the roc linker is now used automatically where it's supported. (Currently that's only x64 Linux.) No need to use --roc-linker anymore, but you can use the --linker flag to switch linkers.");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
// Use surgical linking when supported, or when explicitly requested with --linker surgical
|
||||
let surgically_link = if matches.is_present(FLAG_LINKER) {
|
||||
matches.value_of(FLAG_LINKER) == Some("surgical")
|
||||
|
Loading…
Reference in New Issue
Block a user