Skip to content

Commit 1e5ec4d

Browse files
authored
Rollup merge of #120188 - devnexen:update_bsd_compiler_base_specs, r=wesleywiser
compiler: update freebsd and netbsd base specs. both support thread local.
2 parents dd538b5 + ed4b99a commit 1e5ec4d

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

compiler/rustc_target/src/spec/base/dragonfly.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub fn opts() -> TargetOptions {
88
has_rpath: true,
99
position_independent_executables: true,
1010
relro_level: RelroLevel::Full,
11+
has_thread_local: true,
1112
default_dwarf_version: 2,
1213
..Default::default()
1314
}

compiler/rustc_target/src/spec/base/freebsd.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub fn opts() -> TargetOptions {
99
crt_static_respected: true,
1010
position_independent_executables: true,
1111
relro_level: RelroLevel::Full,
12+
has_thread_local: true,
1213
abi_return_struct_as_int: true,
1314
default_dwarf_version: 2,
1415
..Default::default()

compiler/rustc_target/src/spec/base/netbsd.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub fn opts() -> TargetOptions {
99
has_rpath: true,
1010
position_independent_executables: true,
1111
relro_level: RelroLevel::Full,
12+
has_thread_local: true,
1213
use_ctors_section: true,
1314
default_dwarf_version: 2,
1415
..Default::default()

library/std/src/sys/pal/unix/thread_local_dtor.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
target_os = "android",
1818
target_os = "fuchsia",
1919
target_os = "redox",
20-
target_os = "hurd"
20+
target_os = "hurd",
21+
target_os = "freebsd",
22+
target_os = "netbsd",
23+
target_os = "dragonfly"
2124
))]
2225
// FIXME: The Rust compiler currently omits weakly function definitions (i.e.,
2326
// __cxa_thread_atexit_impl) and its metadata from LLVM IR.

0 commit comments

Comments
 (0)