summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/spec/openbsd_base.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_target/src/spec/openbsd_base.rs')
-rw-r--r--compiler/rustc_target/src/spec/openbsd_base.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/spec/openbsd_base.rs b/compiler/rustc_target/src/spec/openbsd_base.rs
new file mode 100644
index 000000000..e7db14e05
--- /dev/null
+++ b/compiler/rustc_target/src/spec/openbsd_base.rs
@@ -0,0 +1,16 @@
+use crate::spec::{cvs, FramePointer, RelroLevel, TargetOptions};
+
+pub fn opts() -> TargetOptions {
+ TargetOptions {
+ os: "openbsd".into(),
+ dynamic_linking: true,
+ families: cvs!["unix"],
+ has_rpath: true,
+ abi_return_struct_as_int: true,
+ position_independent_executables: true,
+ frame_pointer: FramePointer::Always, // FIXME 43575: should be MayOmit...
+ relro_level: RelroLevel::Full,
+ default_dwarf_version: 2,
+ ..Default::default()
+ }
+}