Skip to content

Commit 45437fb

Browse files
committed
Reduce dependence on the target name
The target name can be anything with custom target specs. Matching on fields inside the target spec is much more robust than matching on the target name.
1 parent 049c24e commit 45437fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
146146

147147
// Wasm statics with custom link sections get special treatment as they
148148
// go into custom sections of the wasm executable.
149-
if self.tcx.sess.opts.target_triple.tuple().starts_with("wasm32") {
149+
if self.tcx.sess.target.is_like_wasm {
150150
if let Some(_section) = attrs.link_section {
151151
unimplemented!();
152152
}

0 commit comments

Comments
 (0)