Skip to content

Cleanup Dragonfly-specific librustc_back target options #28211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/librustc_back/target/dragonfly_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,10 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
linker_is_gnu: true,
has_rpath: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming, but it looks like the only place this is used is passing the -O1 flag to the linker, and the dragonfly linker doesn't support that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I wonder why FreeBSD (freebsd_base.rs) removed linker_is_gnu then. ld in DragonFly is gnu. So this clearly has to stay.

pre_link_args: vec!(
"-L/usr/local/lib".to_string(),
"-L/usr/lib/gcc47".to_string(),
// GNU-style linkers will use this to omit linking to libraries
// which don't actually fulfill any relocations, but only for
// libraries which follow this flag. Thus, use it before
// specifying libraries to link to.
"-Wl,--as-needed".to_string(),
),
position_independent_executables: true,
archive_format: "gnu".to_string(),
exe_allocation_crate: super::best_allocator(),

.. Default::default()
}
}
27 changes: 0 additions & 27 deletions src/librustc_back/target/i686_unknown_dragonfly.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ impl Target {
i686_unknown_freebsd,
x86_64_unknown_freebsd,

i686_unknown_dragonfly,
x86_64_unknown_dragonfly,

x86_64_unknown_bitrig,
Expand Down