musl: don't use the included startfiles with -crt-static
This fixes (only for -crt-static) #36710.
This commit is contained in:
parent
a47b2d09d6
commit
bf3b8df697
3 changed files with 37 additions and 9 deletions
|
|
@ -625,6 +625,11 @@ fn link_natively(sess: &Session,
|
|||
if let Some(args) = sess.target.target.options.pre_link_args.get(&flavor) {
|
||||
cmd.args(args);
|
||||
}
|
||||
if let Some(args) = sess.target.target.options.pre_link_args_crt.get(&flavor) {
|
||||
if sess.crt_static() {
|
||||
cmd.args(args);
|
||||
}
|
||||
}
|
||||
if let Some(ref args) = sess.opts.debugging_opts.pre_link_args {
|
||||
cmd.args(args);
|
||||
}
|
||||
|
|
@ -639,6 +644,12 @@ fn link_natively(sess: &Session,
|
|||
cmd.arg(root.join(obj));
|
||||
}
|
||||
|
||||
if crate_type == config::CrateTypeExecutable && sess.crt_static() {
|
||||
for obj in &sess.target.target.options.pre_link_objects_exe_crt {
|
||||
cmd.arg(root.join(obj));
|
||||
}
|
||||
}
|
||||
|
||||
if sess.target.target.options.is_like_emscripten {
|
||||
cmd.arg("-s");
|
||||
cmd.arg(if sess.panic_strategy() == PanicStrategy::Abort {
|
||||
|
|
@ -660,6 +671,11 @@ fn link_natively(sess: &Session,
|
|||
for obj in &sess.target.target.options.post_link_objects {
|
||||
cmd.arg(root.join(obj));
|
||||
}
|
||||
if sess.crt_static() {
|
||||
for obj in &sess.target.target.options.post_link_objects_crt {
|
||||
cmd.arg(root.join(obj));
|
||||
}
|
||||
}
|
||||
if let Some(args) = sess.target.target.options.post_link_args.get(&flavor) {
|
||||
cmd.args(args);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue