Skip to content

Commit

Permalink
Fix other.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 0e98c20 commit e1d4787
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 @@ -10409,7 +10409,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 @@ -478,7 +478,7 @@ def generate_ninja(self, build_dir, libname):
relative_source_dir = os.path.relpath(source_dir, build_dir)
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}']
asflags = get_base_cflags(preprocess=False)
input_files = self.get_files()
ninja_file = os.path.join(build_dir, 'build.ninja')
Expand All @@ -502,7 +502,7 @@ def build_objects(self, build_dir):
relative_source_dir = os.path.relpath(source_dir, build_dir)
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}']
case_insensitive = is_case_insensitive(build_dir)
for src in self.get_files():
ext = shared.suffix(src)
Expand Down

0 comments on commit e1d4787

Please sign in to comment.