1
Fork 0

Use more robust checks in rustc for wasm

This commit is contained in:
Alex Crichton 2021-11-01 14:32:55 -07:00
parent d2a3c24a95
commit a3b9405ae7
3 changed files with 5 additions and 5 deletions

View file

@ -490,7 +490,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> {
// Wasm statics with custom link sections get special treatment as they
// go into custom sections of the wasm executable.
if self.tcx.sess.opts.target_triple.triple().starts_with("wasm") {
if self.tcx.sess.target.is_like_wasm {
if let Some(section) = attrs.link_section {
let section = llvm::LLVMMDStringInContext(
self.llcx,