Skip to content

Commit

Permalink
[llvm-jitlink] Use '@' rather than ':' for separator in -sectcreate.
Browse files Browse the repository at this point in the history
This should avoid the issue with Windows paths that have caused failures on
some builders.
  • Loading branch information
lhames committed Feb 20, 2024
1 parent 39cab1a commit 54b014b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/test/ExecutionEngine/JITLink/Generic/sectcreate.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RUN: llc -filetype=obj -o %t.o %S/Inputs/main-ret-0.ll
# RUN: llvm-jitlink -noexec \
# RUN: -sectcreate __data,%S/Inputs/sectcreate-data.txt:foo=0 \
# RUN: -sectcreate __data,%S/Inputs/sectcreate-data.txt@foo=0 \
# RUN: %t.o
#
# Use -sectcreate to create a section from a data file.
Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-jitlink/llvm-jitlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static cl::list<std::string>

static cl::list<std::string>
SectCreate("sectcreate",
cl::desc("given <sectname>,<filename>[:<sym>=<offset>,...] "
cl::desc("given <sectname>,<filename>[@<sym>=<offset>,...] "
"add the content of <filename> to <sectname>"),
cl::cat(JITLinkCategory));

Expand Down Expand Up @@ -1683,7 +1683,7 @@ static Error addSectCreates(Session &S,

StringRef SCArg(*SCItr);

auto [SectAndFileName, ExtraSymbolsString] = SCArg.split(':');
auto [SectAndFileName, ExtraSymbolsString] = SCArg.split('@');
auto [SectName, FileName] = SectAndFileName.rsplit(',');
if (SectName.empty())
return make_error<StringError>("In -sectcreate=" + SCArg +
Expand Down

0 comments on commit 54b014b

Please sign in to comment.