Skip to content

Commit

Permalink
Set relocation_model to Pic on emscripten target
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Jun 24, 2022
1 parent 7036449 commit ada2acc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::{cvs, wasm_base};
use super::{LinkArgs, LinkerFlavor, PanicStrategy, Target, TargetOptions};
use super::{LinkArgs, LinkerFlavor, PanicStrategy, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let mut options = wasm_base::options();
Expand All @@ -26,6 +26,7 @@ pub fn target() -> Target {
// functionality, and a .wasm file.
exe_suffix: ".js".into(),
linker: None,
relocation_model: RelocModel::Pic,
panic_strategy: PanicStrategy::Unwind,
no_default_libraries: false,
post_link_args,
Expand Down

0 comments on commit ada2acc

Please sign in to comment.