Remove --link option from CLI

This commit is contained in:
Richard Feldman 2022-05-05 17:36:25 -04:00
parent e86fd9e879
commit a836570a7b
No known key found for this signature in database
GPG Key ID: 7E4127D1E4241798

View File

@ -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")