Merge pull request #6309 from yandex/compiler-no-defaultlibs

Avoid extra dependency in Compiler (used with compile = 1 setting)
This commit is contained in:
alexey-milovidov 2019-08-03 18:46:03 +03:00 committed by GitHub
commit 72e3f35924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,6 +236,9 @@ void Compiler::compile(
" -fuse-ld=" << compiler_executable_root << INTERNAL_LINKER_EXECUTABLE
" -fdiagnostics-color=never"
/// Do not use libgcc and startup files. The library will work nevertheless and we avoid extra dependency.
" -nodefaultlibs -nostartfiles"
#if INTERNAL_COMPILER_CUSTOM_ROOT
/// To get correct order merge this results carefully:
/// echo | clang -x c++ -E -Wp,-v -