https://bugs.llvm.org/show_bug.cgi?id=38050

            Bug ID: 38050
           Summary: -fdebug-prefix-map is a no-op for .S files
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: star...@gmail.com
                CC: llvm-bugs@lists.llvm.org

When compiling assembly (.S) files with `-g`, clang does not respect
-fdebug-prefix-map to change the embedded source file path information.

Example:

```lang=sh
echo 'int main() { return 0; }' > dummy.c
clang -S -c dummy.c -o dummy.S

# Works with .c
clang -fdebug-prefix-map=$PWD= -g -c dummy.c -o dummy
strings dummy | grep $PWD
# PWD was successfully remapped.

# Does not work with .S
clang -fdebug-prefix-map=$PWD= -g dummy.S -o dummy
strings dummy | grep $PWD
# PWD is embedded in the object file.

# gcc does it correctly.
gcc -fdebug-prefix-map=$PWD= -g dummy.S -o dummy
strings dummy | grep $PWD
# PWD was successfully remapped.
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to