diff options
| author | Sam Clegg <sbc@chromium.org> | 2017-12-05 16:53:25 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2017-12-05 16:53:25 +0000 |
| commit | 22cfe52398c78b4027e527f89f8251b6eac97aef (patch) | |
| tree | 01fd00e61109870ce74e43cc2da835c7a8075bd5 /lld/wasm/Driver.cpp | |
| parent | a4ca525c1bfd3d4d3df8564b5e75ebacf48f2ba0 (diff) | |
| download | bcm5719-llvm-22cfe52398c78b4027e527f89f8251b6eac97aef.tar.gz bcm5719-llvm-22cfe52398c78b4027e527f89f8251b6eac97aef.zip | |
[WebAssembly] Simplify check for emitting relocations
This is a small change I split of from a larger one
that simplifies the condition that need to be checked
when decided if we need to emit relocation and all the
things they depend on (symbols, etc).
Differential Revision: https://reviews.llvm.org/D40825
llvm-svn: 319789
Diffstat (limited to 'lld/wasm/Driver.cpp')
| -rw-r--r-- | lld/wasm/Driver.cpp | 2 |
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); |

