<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang drops the -flto=full when compiling an assembler file"
href="https://bugs.llvm.org/show_bug.cgi?id=42831">42831</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang drops the -flto=full when compiling an assembler file
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>belangerj@ainfosec.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>When I type the following (note: for a .c file and -flto=full specified):
----------------------------
$ clang -flto-full -W<others> -f<others> -c test.c -o test.c.o -v
clang version 8.0.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/users/me/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@m32
Selected multilib: .;@m64
"/home/users/me/llvm/bin/clang-8" \
-cc1 \
-triple x86_64-unknown-linux-gnu \
-emit-llvm-bc \
-flto=full \ # <<<<< Note: -flto=full
-flto-unit \
-disable-free \
-disable-llvm-verifier \
-discard-value-names \
-main-file-name test.c \
-mrelocation-model pic \
-pic-level 2 \
-mthread-model posix \
-fmerge-all-constants \
-fmath-errno \
-masm-verbose \
-mconstructor-aliases \
-munwind-tables \
-fuse-init-array \
-target-cpu x86-64 \
-dwarf-column-info \
-debugger-tuning=gdb \
-momit-leaf-frame-pointer \
-v \
-coverage-notes-file test.c.gcno \
-nostdsysteminc \
-nobuiltininc \
-resource-dir /home/users/me/llvm/lib/clang/8.0.0 \
<all-my-includes> \
<all-my-supplied-options> \
-o test.c.o \
-x c \
test.c \
-faddrsig
clang -cc1 version 8.0.0 based upon LLVM 8.0.0 default target
x86_64-unknown-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
<list-of-my-include-files>
End of search list.
----------------------------
When I type the following (note for a .S file):
----------------------------
$ clang -flto-full -W<others> -f<others> -c test.S -o test.S.o -v
clang version 8.0.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/users/me/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@m32
Selected multilib: .;@m64
"/home/users/me/llvm/bin/clang-8" \
-cc1 \
-triple x86_64-unknown-linux-gnu \
-E \ # <<<<< Note: E
# <<<<< Note: no
-emit-llvm-bc
# <<<<< Note: no -flto=full
# <<<<< Note: no -flto-unit
-disable-free \
-disable-llvm-verifier \
-discard-value-names \
-main-file-name test.S \
-mrelocation-model pic \
-pic-level 2 \
-mthread-model posix \
-fmerge-all-constants \
-fmath-errno \
-masm-verbose \
-mconstructor-aliases \
-munwind-tables \
-fuse-init-array \
-target-cpu x86-64 \
-dwarf-column-info \
-debugger-tuning=gdb \
-momit-leaf-frame-pointer \
-v \
-coverage-notes-file test.S.gcno \
-nostdsysteminc \
-nobuiltininc \
-resource-dir /home/users/me/llvm/lib/clang/8.0.0 \
<all-my-includes> \
<all-my-supplied-options> \
-o test.S.o \
-x c \
test.S \
-faddrsig
clang -cc1 version 8.0.0 based upon LLVM 8.0.0 default target
x86_64-unknown-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
<list-of-my-include-files>
End of search list.
----------------------------</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>