Skip to content

Commit

Permalink
elf: account for differences in handling of TLS LD by gcc and clang
Browse files Browse the repository at this point in the history
  • Loading branch information
kubkon committed Jul 22, 2023
1 parent 46dfe90 commit 46c9612
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/elf.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2692,15 +2692,17 @@ fn testTlsLdDso(b: *Build, opts: Options) *Step {
\\extern int f0();
\\extern int f1();
\\int main() {
\\ printf("%d %d\n", f0(), f1());
\\ int x = f0();
\\ int y = f1();
\\ printf("%d %d\n", x, y);
\\ return 0;
\\}
);
exe.addFileSource(dso_out.file);
exe.addPrefixedDirectorySource("-Wl,-rpath,", dso_out.dir);

const run = exe.run();
run.expectStdOutEqual("1 1\n");
run.expectStdOutEqual("1 2\n");
test_step.dependOn(run.step());

return test_step;
Expand Down

0 comments on commit 46c9612

Please sign in to comment.