[llvm-bugs] [Bug 38050] New: -fdebug-prefix-map is a no-op for .S files

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 4 00:32:31 PDT 2018


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: unassignedclangbugs at nondot.org
          Reporter: starsid at gmail.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180704/96265012/attachment.html>


More information about the llvm-bugs mailing list