protze.joachim added a comment. The use case, where I see the current behavior as an issue is linking multiple object files compiled from different languages. Many build systems will pass CFLAGS as well as FFLAGS to the linker command in such case. To automatically link the necessary language-specific runtime libraries, I see using the compiler for linking as common practice:
$(FC) -c fortran-code.F90 $(FFLAGS) $(CXX) -c cpp-code.cpp $(CFLAGS) $(CC) -c c-code.c $(CFLAGS) $(CXX) fortran-code.o cpp-code.o c-code.o $(FFLAGS) $(CFLAGS) -l$(FORTRAN_RUNTIME) To support such workflow, the compiler should not error out, at least when only used for linking. This works with `CC=gcc`, `CXX=g++`, `FC=gfortran`, and `FORTRAN_RUNTIME=gfortran`. This used to work with `CC=clang`, `CXX=clang++`, `FC=gfortran`, and `FORTRAN_RUNTIME=gfortran`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99353/new/ https://reviews.llvm.org/D99353 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits