Skip to content

Commit 013077b

Browse files
committed
rustc_target: introduce Os
Improve type safety by using an enum rather than strings.
1 parent fefef5b commit 013077b

File tree

149 files changed

+591
-488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+591
-488
lines changed

compiler/rustc_codegen_cranelift/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
4747
use rustc_session::Session;
4848
use rustc_session::config::OutputFilenames;
4949
use rustc_span::{Symbol, sym};
50-
use rustc_target::spec::{Abi, Arch, Env};
50+
use rustc_target::spec::{Abi, Arch, Env, Os};
5151

5252
pub use crate::config::*;
5353
use crate::prelude::*;
@@ -185,15 +185,15 @@ impl CodegenBackend for CraneliftCodegenBackend {
185185
fn target_config(&self, sess: &Session) -> TargetConfig {
186186
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
187187
let target_features = match sess.target.arch {
188-
Arch::X86_64 if sess.target.os != "none" => {
188+
Arch::X86_64 if sess.target.os != Os::None => {
189189
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
190190
vec![sym::fxsr, sym::sse, sym::sse2, Symbol::intern("x87")]
191191
}
192-
Arch::AArch64 => match &*sess.target.os {
193-
"none" => vec![],
192+
Arch::AArch64 => match &sess.target.os {
193+
Os::None => vec![],
194194
// On macOS the aes, sha2 and sha3 features are enabled by default and ring
195195
// fails to compile on macOS when they are not present.
196-
"macos" => vec![sym::neon, sym::aes, sym::sha2, sym::sha3],
196+
Os::MacOs => vec![sym::neon, sym::aes, sym::sha2, sym::sha3],
197197
// AArch64 mandates Neon support
198198
_ => vec![sym::neon],
199199
},
@@ -214,7 +214,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
214214
// targets due to GCC using a different ABI than LLVM. Therefore `f16` won't be
215215
// available when using a LLVM-built sysroot.
216216
Arch::X86_64
217-
if sess.target.os == "windows"
217+
if sess.target.os == Os::Windows
218218
&& sess.target.env == Env::Gnu
219219
&& sess.target.abi != Abi::Llvm =>
220220
{

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rustc_span::source_map::Spanned;
2929
use rustc_span::{DUMMY_SP, Span, Symbol};
3030
use rustc_symbol_mangling::mangle_internal_symbol;
3131
use rustc_target::spec::{
32-
Abi, Arch, Env, HasTargetSpec, RelocModel, SmallDataThresholdSupport, Target, TlsModel,
32+
Abi, Arch, Env, HasTargetSpec, Os, RelocModel, SmallDataThresholdSupport, Target, TlsModel,
3333
};
3434
use smallvec::SmallVec;
3535

@@ -335,7 +335,7 @@ pub(crate) unsafe fn create_module<'ll>(
335335

336336
// Control Flow Guard is currently only supported by MSVC and LLVM on Windows.
337337
if sess.target.is_like_msvc
338-
|| (sess.target.options.os == "windows"
338+
|| (sess.target.options.os == Os::Windows
339339
&& sess.target.options.env == Env::Gnu
340340
&& sess.target.options.abi == Abi::Llvm)
341341
{
@@ -669,7 +669,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
669669
/// This corresponds to the `-fobjc-abi-version=` flag in Clang / GCC.
670670
pub(crate) fn objc_abi_version(&self) -> u32 {
671671
assert!(self.tcx.sess.target.is_like_darwin);
672-
if self.tcx.sess.target.arch == Arch::X86 && self.tcx.sess.target.os == "macos" {
672+
if self.tcx.sess.target.arch == Arch::X86 && self.tcx.sess.target.os == Os::MacOs {
673673
// 32-bit x86 macOS uses ABI version 1 (a.k.a. the "fragile ABI").
674674
1
675675
} else {
@@ -963,7 +963,7 @@ impl<'ll> CodegenCx<'ll, '_> {
963963
return eh_catch_typeinfo;
964964
}
965965
let tcx = self.tcx;
966-
assert!(self.sess().target.os == "emscripten");
966+
assert!(self.sess().target.os == Os::Emscripten);
967967
let eh_catch_typeinfo = match tcx.lang_items().eh_catch_typeinfo() {
968968
Some(def_id) => self.get_static(def_id),
969969
_ => {

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use rustc_middle::{bug, span_bug};
1818
use rustc_span::{Span, Symbol, sym};
1919
use rustc_symbol_mangling::{mangle_internal_symbol, symbol_name_for_instance_in_crate};
2020
use rustc_target::callconv::PassMode;
21+
use rustc_target::spec::Os;
2122
use tracing::debug;
2223

2324
use crate::abi::FnAbiLlvmExt;
@@ -681,7 +682,7 @@ fn catch_unwind_intrinsic<'ll, 'tcx>(
681682
codegen_msvc_try(bx, try_func, data, catch_func, dest);
682683
} else if wants_wasm_eh(bx.sess()) {
683684
codegen_wasm_try(bx, try_func, data, catch_func, dest);
684-
} else if bx.sess().target.os == "emscripten" {
685+
} else if bx.sess().target.os == Os::Emscripten {
685686
codegen_emcc_try(bx, try_func, data, catch_func, dest);
686687
} else {
687688
codegen_gnu_try(bx, try_func, data, catch_func, dest);

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_middle::bug;
1616
use rustc_session::Session;
1717
use rustc_session::config::{PrintKind, PrintRequest};
1818
use rustc_target::spec::{
19-
Abi, Arch, Env, MergeFunctions, PanicStrategy, SmallDataThresholdSupport,
19+
Abi, Arch, Env, MergeFunctions, Os, PanicStrategy, SmallDataThresholdSupport,
2020
};
2121
use smallvec::{SmallVec, smallvec};
2222

@@ -106,7 +106,7 @@ unsafe fn configure_llvm(sess: &Session) {
106106
add("-wasm-enable-eh", false);
107107
}
108108

109-
if sess.target.os == "emscripten"
109+
if sess.target.os == Os::Emscripten
110110
&& !sess.opts.unstable_opts.emscripten_wasm_eh
111111
&& sess.panic_strategy().unwinds()
112112
{
@@ -353,7 +353,7 @@ pub(crate) fn target_config(sess: &Session) -> TargetConfig {
353353
/// Determine whether or not experimental float types are reliable based on known bugs.
354354
fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
355355
let target_arch = &sess.target.arch;
356-
let target_os = sess.target.options.os.as_ref();
356+
let target_os = &sess.target.options.os;
357357
let target_env = &sess.target.options.env;
358358
let target_abi = &sess.target.options.abi;
359359
let target_pointer_width = sess.target.pointer_width;
@@ -373,7 +373,7 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
373373
// Selection failure <https://github.com/llvm/llvm-project/issues/50374> (fixed in llvm21)
374374
(Arch::S390x, _) if lt_21_0_0 => false,
375375
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
376-
(Arch::X86_64, "windows") if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
376+
(Arch::X86_64, Os::Windows) if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
377377
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>
378378
(Arch::CSky, _) => false,
379379
(Arch::Hexagon, _) if lt_21_0_0 => false, // (fixed in llvm21)
@@ -405,7 +405,7 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
405405
// not fail if our compiler-builtins is linked. (fixed in llvm21)
406406
(Arch::X86, _) if lt_21_0_0 => false,
407407
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
408-
(Arch::X86_64, "windows") if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
408+
(Arch::X86_64, Os::Windows) if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
409409
// There are no known problems on other platforms, so the only requirement is that symbols
410410
// are available. `compiler-builtins` provides all symbols required for core `f128`
411411
// support, so this should work for everything else.
@@ -428,7 +428,7 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
428428
// musl does not implement the symbols required for f128 math at all.
429429
_ if *target_env == Env::Musl => false,
430430
(Arch::X86_64, _) => false,
431-
(_, "linux") if target_pointer_width == 64 => true,
431+
(_, Os::Linux) if target_pointer_width == 64 => true,
432432
_ => false,
433433
} && cfg.has_reliable_f128;
434434
}

compiler/rustc_codegen_ssa/src/back/apple.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use itertools::Itertools;
66
use rustc_middle::middle::exported_symbols::SymbolExportKind;
77
use rustc_session::Session;
88
pub(super) use rustc_target::spec::apple::OSVersion;
9-
use rustc_target::spec::{Arch, Env, Target};
9+
use rustc_target::spec::{Arch, Env, Os, Target};
1010
use tracing::debug;
1111

1212
use crate::errors::{XcrunError, XcrunSdkPathWarning};
@@ -17,34 +17,34 @@ mod tests;
1717

1818
/// The canonical name of the desired SDK for a given target.
1919
pub(super) fn sdk_name(target: &Target) -> &'static str {
20-
match (&*target.os, &target.env) {
21-
("macos", Env::Unspecified) => "MacOSX",
22-
("ios", Env::Unspecified) => "iPhoneOS",
23-
("ios", Env::Sim) => "iPhoneSimulator",
20+
match (&target.os, &target.env) {
21+
(Os::MacOs, Env::Unspecified) => "MacOSX",
22+
(Os::Ios, Env::Unspecified) => "iPhoneOS",
23+
(Os::Ios, Env::Sim) => "iPhoneSimulator",
2424
// Mac Catalyst uses the macOS SDK
25-
("ios", Env::MacAbi) => "MacOSX",
26-
("tvos", Env::Unspecified) => "AppleTVOS",
27-
("tvos", Env::Sim) => "AppleTVSimulator",
28-
("visionos", Env::Unspecified) => "XROS",
29-
("visionos", Env::Sim) => "XRSimulator",
30-
("watchos", Env::Unspecified) => "WatchOS",
31-
("watchos", Env::Sim) => "WatchSimulator",
25+
(Os::Ios, Env::MacAbi) => "MacOSX",
26+
(Os::Tvos, Env::Unspecified) => "AppleTVOS",
27+
(Os::Tvos, Env::Sim) => "AppleTVSimulator",
28+
(Os::VisionOs, Env::Unspecified) => "XROS",
29+
(Os::VisionOs, Env::Sim) => "XRSimulator",
30+
(Os::WatchOs, Env::Unspecified) => "WatchOS",
31+
(Os::WatchOs, Env::Sim) => "WatchSimulator",
3232
(os, abi) => unreachable!("invalid os '{os}' / abi '{abi}' combination for Apple target"),
3333
}
3434
}
3535

3636
pub(super) fn macho_platform(target: &Target) -> u32 {
37-
match (&*target.os, &target.env) {
38-
("macos", _) => object::macho::PLATFORM_MACOS,
39-
("ios", Env::MacAbi) => object::macho::PLATFORM_MACCATALYST,
40-
("ios", Env::Sim) => object::macho::PLATFORM_IOSSIMULATOR,
41-
("ios", _) => object::macho::PLATFORM_IOS,
42-
("watchos", Env::Sim) => object::macho::PLATFORM_WATCHOSSIMULATOR,
43-
("watchos", _) => object::macho::PLATFORM_WATCHOS,
44-
("tvos", Env::Sim) => object::macho::PLATFORM_TVOSSIMULATOR,
45-
("tvos", _) => object::macho::PLATFORM_TVOS,
46-
("visionos", Env::Sim) => object::macho::PLATFORM_XROSSIMULATOR,
47-
("visionos", _) => object::macho::PLATFORM_XROS,
37+
match (&target.os, &target.env) {
38+
(Os::MacOs, _) => object::macho::PLATFORM_MACOS,
39+
(Os::Ios, Env::MacAbi) => object::macho::PLATFORM_MACCATALYST,
40+
(Os::Ios, Env::Sim) => object::macho::PLATFORM_IOSSIMULATOR,
41+
(Os::Ios, _) => object::macho::PLATFORM_IOS,
42+
(Os::WatchOs, Env::Sim) => object::macho::PLATFORM_WATCHOSSIMULATOR,
43+
(Os::WatchOs, _) => object::macho::PLATFORM_WATCHOS,
44+
(Os::Tvos, Env::Sim) => object::macho::PLATFORM_TVOSSIMULATOR,
45+
(Os::Tvos, _) => object::macho::PLATFORM_TVOS,
46+
(Os::VisionOs, Env::Sim) => object::macho::PLATFORM_XROSSIMULATOR,
47+
(Os::VisionOs, _) => object::macho::PLATFORM_XROS,
4848
(os, env) => unreachable!("invalid os '{os}' / env '{env}' combination for Apple target"),
4949
}
5050
}

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use rustc_span::Symbol;
4747
use rustc_target::spec::crt_objects::CrtObjects;
4848
use rustc_target::spec::{
4949
BinaryFormat, Cc, Env, LinkOutputKind, LinkSelfContainedComponents, LinkSelfContainedDefault,
50-
LinkerFeatures, LinkerFlavor, LinkerFlavorCli, Lld, RelocModel, RelroLevel, SanitizerSet,
50+
LinkerFeatures, LinkerFlavor, LinkerFlavorCli, Lld, Os, RelocModel, RelroLevel, SanitizerSet,
5151
SplitDebuginfo, Vendor,
5252
};
5353
use tracing::{debug, info, warn};
@@ -1842,7 +1842,7 @@ fn add_pre_link_objects(
18421842
let empty = Default::default();
18431843
let objects = if self_contained {
18441844
&opts.pre_link_objects_self_contained
1845-
} else if !(sess.target.os == "fuchsia" && matches!(flavor, LinkerFlavor::Gnu(Cc::Yes, _))) {
1845+
} else if !(sess.target.os == Os::Fuchsia && matches!(flavor, LinkerFlavor::Gnu(Cc::Yes, _))) {
18461846
&opts.pre_link_objects
18471847
} else {
18481848
&empty
@@ -2493,7 +2493,7 @@ fn add_order_independent_options(
24932493

24942494
let apple_sdk_root = add_apple_sdk(cmd, sess, flavor);
24952495

2496-
if sess.target.os == "fuchsia"
2496+
if sess.target.os == Os::Fuchsia
24972497
&& crate_type == CrateType::Executable
24982498
&& !matches!(flavor, LinkerFlavor::Gnu(Cc::Yes, _))
24992499
{
@@ -2516,7 +2516,7 @@ fn add_order_independent_options(
25162516
cmd.no_crt_objects();
25172517
}
25182518

2519-
if sess.target.os == "emscripten" {
2519+
if sess.target.os == Os::Emscripten {
25202520
cmd.cc_arg(if sess.opts.unstable_opts.emscripten_wasm_eh {
25212521
"-fwasm-exceptions"
25222522
} else if sess.panic_strategy().unwinds() {
@@ -3071,7 +3071,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
30713071

30723072
// `sess.target.arch` (`target_arch`) is not detailed enough.
30733073
let llvm_arch = sess.target.llvm_target.split_once('-').expect("LLVM target must have arch").0;
3074-
let target_os = &*sess.target.os;
3074+
let target_os = &sess.target.os;
30753075
let target_env = &sess.target.env;
30763076

30773077
// The architecture name to forward to the linker.
@@ -3124,12 +3124,12 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
31243124
// > - xros-simulator
31253125
// > - driverkit
31263126
let platform_name = match (target_os, target_env) {
3127-
(os, Env::Unspecified) => os,
3128-
("ios", Env::MacAbi) => "mac-catalyst",
3129-
("ios", Env::Sim) => "ios-simulator",
3130-
("tvos", Env::Sim) => "tvos-simulator",
3131-
("watchos", Env::Sim) => "watchos-simulator",
3132-
("visionos", Env::Sim) => "visionos-simulator",
3127+
(os, Env::Unspecified) => os.desc(),
3128+
(Os::Ios, Env::MacAbi) => "mac-catalyst",
3129+
(Os::Ios, Env::Sim) => "ios-simulator",
3130+
(Os::Tvos, Env::Sim) => "tvos-simulator",
3131+
(Os::WatchOs, Env::Sim) => "watchos-simulator",
3132+
(Os::VisionOs, Env::Sim) => "visionos-simulator",
31333133
_ => bug!("invalid OS/env combination for Apple target: {target_os}, {target_env}"),
31343134
};
31353135

@@ -3193,7 +3193,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
31933193
// fairly safely use `-target`. See also the following, where it is
31943194
// made explicit that the recommendation by LLVM developers is to use
31953195
// `-target`: <https://github.com/llvm/llvm-project/issues/88271>
3196-
if target_os == "macos" {
3196+
if *target_os == Os::MacOs {
31973197
// `-arch` communicates the architecture.
31983198
//
31993199
// CC forwards the `-arch` to the linker, so we use the same value

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_middle::middle::exported_symbols::{
1717
use rustc_middle::ty::TyCtxt;
1818
use rustc_session::Session;
1919
use rustc_session::config::{self, CrateType, DebugInfo, LinkerPluginLto, Lto, OptLevel, Strip};
20-
use rustc_target::spec::{Arch, Cc, LinkOutputKind, LinkerFlavor, Lld, Vendor};
20+
use rustc_target::spec::{Arch, Cc, LinkOutputKind, LinkerFlavor, Lld, Os, Vendor};
2121
use tracing::{debug, warn};
2222

2323
use super::command::Command;
@@ -136,10 +136,10 @@ pub(crate) fn get_linker<'a>(
136136
// to the linker args construction.
137137
assert!(cmd.get_args().is_empty() || sess.target.vendor == Vendor::Uwp);
138138
match flavor {
139-
LinkerFlavor::Unix(Cc::No) if sess.target.os == "l4re" => {
139+
LinkerFlavor::Unix(Cc::No) if sess.target.os == Os::L4Re => {
140140
Box::new(L4Bender::new(cmd, sess)) as Box<dyn Linker>
141141
}
142-
LinkerFlavor::Unix(Cc::No) if sess.target.os == "aix" => {
142+
LinkerFlavor::Unix(Cc::No) if sess.target.os == Os::Aix => {
143143
Box::new(AixLinker::new(cmd, sess)) as Box<dyn Linker>
144144
}
145145
LinkerFlavor::WasmLld(Cc::No) => Box::new(WasmLd::new(cmd, sess)) as Box<dyn Linker>,
@@ -573,7 +573,7 @@ impl<'a> Linker for GccLinker<'a> {
573573
// any `#[link]` attributes in the `libc` crate, see #72782 for details.
574574
// FIXME: Switch to using `#[link]` attributes in the `libc` crate
575575
// similarly to other targets.
576-
if self.sess.target.os == "vxworks"
576+
if self.sess.target.os == Os::VxWorks
577577
&& matches!(
578578
output_kind,
579579
LinkOutputKind::StaticNoPicExe
@@ -595,7 +595,7 @@ impl<'a> Linker for GccLinker<'a> {
595595
}
596596

597597
fn link_dylib_by_name(&mut self, name: &str, verbatim: bool, as_needed: bool) {
598-
if self.sess.target.os == "illumos" && name == "c" {
598+
if self.sess.target.os == Os::Illumos && name == "c" {
599599
// libc will be added via late_link_args on illumos so that it will
600600
// appear last in the library search order.
601601
// FIXME: This should be replaced by a more complete and generic
@@ -1439,7 +1439,7 @@ impl<'a> Linker for WasmLd<'a> {
14391439
// symbols explicitly passed via the `--export` flags above and hides all
14401440
// others. Various bits and pieces of wasm32-unknown-unknown tooling use
14411441
// this, so be sure these symbols make their way out of the linker as well.
1442-
if self.sess.target.os == "unknown" || self.sess.target.os == "none" {
1442+
if matches!(self.sess.target.os, Os::Unknown | Os::None) {
14431443
self.link_args(&["--export=__heap_base", "--export=__data_end"]);
14441444
}
14451445
}

compiler/rustc_codegen_ssa/src/back/metadata.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_metadata::fs::METADATA_FILENAME;
2020
use rustc_middle::bug;
2121
use rustc_session::Session;
2222
use rustc_span::sym;
23-
use rustc_target::spec::{Abi, RelocModel, Target, ef_avr_arch};
23+
use rustc_target::spec::{Abi, Os, RelocModel, Target, ef_avr_arch};
2424
use tracing::debug;
2525

2626
use super::apple;
@@ -260,10 +260,10 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
260260
}
261261

262262
pub(super) fn elf_os_abi(sess: &Session) -> u8 {
263-
match sess.target.options.os.as_ref() {
264-
"hermit" => elf::ELFOSABI_STANDALONE,
265-
"freebsd" => elf::ELFOSABI_FREEBSD,
266-
"solaris" => elf::ELFOSABI_SOLARIS,
263+
match sess.target.options.os {
264+
Os::Hermit => elf::ELFOSABI_STANDALONE,
265+
Os::FreeBsd => elf::ELFOSABI_FREEBSD,
266+
Os::Solaris => elf::ELFOSABI_SOLARIS,
267267
_ => elf::ELFOSABI_NONE,
268268
}
269269
}

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_middle::ty::{self, GenericArgKind, GenericArgsRef, Instance, SymbolNam
1717
use rustc_middle::util::Providers;
1818
use rustc_session::config::{CrateType, OomStrategy};
1919
use rustc_symbol_mangling::mangle_internal_symbol;
20-
use rustc_target::spec::{Arch, TlsModel};
20+
use rustc_target::spec::{Arch, Os, TlsModel};
2121
use tracing::debug;
2222

2323
use crate::back::symbol_export;
@@ -711,7 +711,7 @@ pub(crate) fn extend_exported_symbols<'tcx>(
711711
) {
712712
let (callconv, _) = calling_convention_for_symbol(tcx, symbol);
713713

714-
if callconv != CanonAbi::GpuKernel || tcx.sess.target.os != "amdhsa" {
714+
if callconv != CanonAbi::GpuKernel || tcx.sess.target.os != Os::AmdHsa {
715715
return;
716716
}
717717

0 commit comments

Comments
 (0)