mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
resolve TODO: don't use vec
This commit is contained in:
parent
794c20956d
commit
4d0112ef2a
1 changed files with 2 additions and 8 deletions
|
@ -981,20 +981,14 @@ fn link_linux(
|
||||||
LinkType::Executable => (
|
LinkType::Executable => (
|
||||||
// Presumably this S stands for Static, since if we include Scrt1.o
|
// Presumably this S stands for Static, since if we include Scrt1.o
|
||||||
// in the linking for dynamic builds, linking fails.
|
// in the linking for dynamic builds, linking fails.
|
||||||
vec![scrt1_path_str.to_string()],
|
[scrt1_path_str.as_ref()],
|
||||||
output_path,
|
output_path,
|
||||||
),
|
),
|
||||||
LinkType::Dylib => {
|
LinkType::Dylib => {
|
||||||
let mut output_path = output_path;
|
let mut output_path = output_path;
|
||||||
output_path.set_extension("so");
|
output_path.set_extension("so");
|
||||||
|
|
||||||
(
|
(["-shared"], output_path)
|
||||||
// TODO: find a way to avoid using a vec! here - should theoretically be
|
|
||||||
// able to do this somehow using &[] but the borrow checker isn't having it.
|
|
||||||
// Also find a way to have these be string slices instead of Strings.
|
|
||||||
vec!["-shared".to_string()],
|
|
||||||
output_path,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
LinkType::None => internal_error!("link_linux should not be called with link type of none"),
|
LinkType::None => internal_error!("link_linux should not be called with link type of none"),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue