Skip to content

Commit 8eef814

Browse files
committed
[lld][WebAssembly] -Bdynamic by default if -pie or -shared is specified
1 parent 8e9d026 commit 8eef814

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lld/wasm/Driver.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,11 @@ static void readConfigs(opt::InputArgList &args) {
554554
config->zStackSize =
555555
args::getZOptionValue(args, OPT_z, "stack-size", WasmPageSize);
556556

557+
// -Bdynamic by default if -pie or -shared is specified.
558+
if (config->pie || config->shared) {
559+
config->isStatic = false;
560+
}
561+
557562
if (config->maxMemory != 0 && config->noGrowableMemory) {
558563
// Erroring out here is simpler than defining precedence rules.
559564
error("--max-memory is incompatible with --no-growable-memory");

0 commit comments

Comments
 (0)