Skip to content

Commit 7752deb

Browse files
committed
Address review comments
1 parent 7d79835 commit 7752deb

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

lld/test/wasm/rpath.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2-
# RUN: wasm-ld -shared -o %t1.wasm %t.o -rpath /a/b/c -rpath /x/y/z
2+
# RUN: wasm-ld -shared -o %t1.wasm %t.o -rpath /a/b/c -rpath /x/y/z --experimental-pic
33
# RUN: obj2yaml %t1.wasm | FileCheck %s
44

55
# CHECK: - Type: CUSTOM

lld/wasm/Config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ struct Config {
7070
bool pie;
7171
bool printGcSections;
7272
bool relocatable;
73-
llvm::SmallVector<llvm::StringRef, 0> rpath;
7473
bool saveTemps;
7574
bool shared;
7675
bool shlibSigCheck;
@@ -125,6 +124,7 @@ struct Config {
125124
std::optional<std::vector<std::string>> features;
126125
std::optional<std::vector<std::string>> extraFeatures;
127126
llvm::SmallVector<uint8_t, 0> buildIdVector;
127+
llvm::SmallVector<llvm::StringRef, 0> rpath;
128128
};
129129

130130
// The Ctx object hold all other (non-configuration) global state.

lld/wasm/Options.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ def: Flag<["-"], "t">, Alias<trace>, HelpText<"Alias for --trace">;
291291
def: JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>, HelpText<"Alias for --trace-symbol">;
292292
def: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
293293
def: Flag<["-"], "V">, Alias<v>, HelpText<"Alias for -v">;
294-
def: JoinedOrSeparate<["-"], "R">, Alias<rpath>, HelpText<"Alias for --rpath">;
295294

296295
// LTO-related options.
297296
def lto_O: JJ<"lto-O">, MetaVarName<"<opt-level>">,

lld/wasm/SyntheticSections.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ void DylinkSection::writeBody() {
134134

135135
sub.writeTo(os);
136136
}
137+
137138
if (!ctx.arg.rpath.empty()) {
138139
SubSection sub(WASM_DYLINK_RUNTIME_PATH);
139140
writeUleb128(sub.os, ctx.arg.rpath.size(), "num rpath entries");
140-
for (const auto ref : ctx.arg.rpath) {
141+
for (const auto ref : ctx.arg.rpath)
141142
writeStr(sub.os, ref, "rpath entry");
142-
}
143143
sub.writeTo(os);
144144
}
145145
}

0 commit comments

Comments
 (0)