Skip to content

Commit

Permalink
Fix test_dwarf_system_lib
Browse files Browse the repository at this point in the history
  • Loading branch information
aheejin committed Dec 19, 2024
1 parent 42986e0 commit ba62274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -10402,7 +10402,7 @@ def test_dwarf_system_lib(self):
[LLVM_DWARFDUMP, libc, '-debug-info', '-debug-line', '--recurse-depth=0'],
stdout=PIPE).stdout
# Check that the embedded location of the source file is correct.
self.assertIn('DW_AT_name\t("system/lib/emmalloc.c")', dwdump)
self.assertIn('DW_AT_name\t("/emsdk/emscripten/system/lib/emmalloc.c")', dwdump)
self.assertIn('DW_AT_comp_dir\t("/emsdk/emscripten")', dwdump)

@parameterized({
Expand Down
4 changes: 2 additions & 2 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def generate_ninja(self, build_dir, libname):
if self.deterministic_paths:
cflags += [f'-ffile-prefix-map={source_dir}={FAKE_EMSCRIPTEN_PATH}',
f'-ffile-prefix-map={relative_source_dir}={FAKE_EMSCRIPTEN_PATH}',
'-fdebug-compilation-dir={FAKE_EMSCRIPTEN_PATH}']
f'-fdebug-compilation-dir={FAKE_EMSCRIPTEN_PATH}']
else:
cflags += [f'-fmacro-prefix-map={source_dir}={FAKE_EMSCRIPTEN_PATH}',
f'-fmacro-prefix-map={relative_source_dir}={FAKE_EMSCRIPTEN_PATH}']
Expand All @@ -502,7 +502,7 @@ def build_objects(self, build_dir):
if self.deterministic_paths:
cflags += [f'-ffile-prefix-map={relative_source_dir}={FAKE_EMSCRIPTEN_PATH}']
cflags += [f'-ffile-prefix-map={source_dir}={FAKE_EMSCRIPTEN_PATH}',
'-fdebug-compilation-dir={FAKE_EMSCRIPTEN_PATH}']
f'-fdebug-compilation-dir={FAKE_EMSCRIPTEN_PATH}']
else:
cflags += [f'-fmacro-prefix-map={relative_source_dir}={FAKE_EMSCRIPTEN_PATH}']
cflags += [f'-fmacro-prefix-map={source_dir}={FAKE_EMSCRIPTEN_PATH}']
Expand Down

0 comments on commit ba62274

Please sign in to comment.