msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.29k stars 1.22k forks source link

clang 7.0.1 -flto flag produced wrong object files #4805

Closed d3vv closed 5 years ago

d3vv commented 5 years ago

$ clang++ -v clang version 7.0.1 (tags/RELEASE_701/final) Target: x86_64-w64-windows-gnu Thread model: posix InstalledDir: C:\msys64\mingw64\bin

clang++ -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto   -c -o syzygy/tbprobe.o syzygy/tbprobe.cpp
clang++ -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o syzygy/tbprobe.o  -latomic -m64 -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto
benchmark.o: file not recognized: File format not recognized
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:496: stockfish] Error 1
make[1]: Leaving directory '/home/dew/REPOS/Stockfish/src'
make: *** [Makefile:413: build] Error 2
Alexpux commented 5 years ago

@d3vv open bugreports on LLVM bugtracker. There are nothing to do from my side