<div dir="ltr"><div>Hi all</div><div><br></div>I came across a minor issue while trying to compile the latests LLVM with compiler-rt.<div><br></div><div>At some point during the build (I am using clang-3.5) I get :</div><div><br></div><div><pre style="white-space:pre-wrap;font-family:'Courier New',courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span class="">clang-3.5: error: argument unused during compilation: '-fno-lto'</span></pre><div>The command that fails (I am using -Werror) is:</div><div><pre style="white-space:pre-wrap;font-family:'Courier New',courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span class="">/home/compteam/opt/clang-build/3.5/bin/clang  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Werror -fcolor-diagnostics -ffunction-sections -fdata-sections -Wall -Werror -g -Iprojects/compiler-rt/lib/tsan -I/home/compteam/slave0/build_folder/src/projects/compiler-rt/lib/tsan -Iinclude -I/home/compteam/slave0/build_folder/src/include -I/home/compteam/slave0/build_folder/src/projects/compiler-rt/lib/tsan/..     -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-function-sections -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fPIE -fno-rtti -Wframe-larger-than=512 -Wglobal-constructors -MMD -MT projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o -MF "projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o.d" -o projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o   -c /home/compteam/slave0/build_folder/src/projects/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S</span></pre><pre style="white-space:pre-wrap;font-family:'Courier New',courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;white-space:normal">My understanding is that -fno-lto is not required while assembling a file, so I think the warning is correct. Should this option be filtered out for Asm files. I think this is related with the configuration in lib/tsan/CMakeLists.txt. Is it a suitable place to try to fix this? Any thoughts?</span></pre><pre style="white-space:pre-wrap;font-family:'Courier New',courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;white-space:normal">Many thanks!</span></pre><pre style="white-space:pre-wrap;font-family:'Courier New',courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;white-space:normal">Samuel</span></pre></div></div></div>