(original) (raw)

Hello Nemanja,

in effect they are. Even in the 2-stage process both ninja and make use the stage1 compiler (with the caveat that there might be a variable which I am missing). But shouldn’t they be built using the stage2 compiler instead ? As that is the compiler we actually will be installing as product of the build and the one that should be tested ?

Thanks,

/Dirk

Am 06.11.2017 um 12:26 schrieb Nemanja Ivanovic <nemanja.i.ibm@gmail.com>:

Aren't unit tests always built with the build compiler (which is stage 1 in your case)?

On Sun, Nov 5, 2017 at 11:53 AM Dirk Schroetter via llvm-dev <llvm-dev@lists.llvm.org> wrote:
Folks,

I am using a two-stagesimple build like this one:

make -G Ninja -DCLANG\_ENABLE\_BOOTSTRAP=ON ../src
ninja stage2-check-all

Stage 1 gets built, and when looking at rules.ninja in the stage2-bins I see:

rule CXX\_COMPILER\_AnalysisTests
depfile = DEP_FILE</font></div><divclass=""><fontface="CourierNew"class="">deps=gcc</font></div><divclass=""><fontface="CourierNew"class="">command=<stage1builddir>./bin/clang++DEP\_FILE</font></div><div class=""><font face="Courier New" class=""> deps = gcc</font></div><div class=""><font face="Courier New" class=""> command = <stage1 build dir>./bin/clang++ DEP_FILE</font></div><divclass=""><fontface="CourierNew"class="">deps=gcc</font></div><divclass=""><fontface="CourierNew"class="">command=<stage1builddir>./bin/clang++DEFINES INCLUDESINCLUDES INCLUDESFLAGS -MMD -MT out−MFout -MF outMFDEP\_FILE -o out−cout -c outcin

This is just an example, in fact all of the CXX\_COMPILER\_{unit tests} point to the the compiler and linker as per above example.

Isn’t that the stage1 compiler that is being used here ? I am pretty sure that I am just missing something here. Any pointers of how I can convince cmake to use the just-built (stage2) compiler for the tests ?

Thanks,

/Dirk


\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
LLVM Developers mailing list
llvm-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev