summaryrefslogtreecommitdiffstats
path: root/lld/wasm/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/Driver.cpp')
-rw-r--r--lld/wasm/Driver.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index 5601cec882c..66329ac130c 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -257,6 +257,8 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
Config->Sysroot = Args.getLastArgValue(OPT_sysroot);
errorHandler().Verbose = Args.hasArg(OPT_verbose);
ThreadsEnabled = Args.hasFlag(OPT_threads, OPT_no_threads, true);
+ if (Config->Relocatable)
+ Config->EmitRelocs = true;
Config->InitialMemory = args::getInteger(Args, OPT_initial_memory, 0);
Config->GlobalBase = args::getInteger(Args, OPT_global_base, 1024);
OpenPOWER on IntegriCloud