Use -static-libgcc only if the compiler is gcc

clang does not accept the -static-libgcc flag and apparently -static-libstdc++ is accepted but has no effect.
This commit is contained in:
francesco-st 2021-02-17 18:42:38 +01:00 committed by GitHub
parent 6369a7f760
commit 588755b15a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ foreach data_module : ['core', 'fonts', 'plugins', 'colors']
endforeach
lite_link_args = []
if get_option('buildtype') == 'release'
if cc.get_id() == 'gcc' and get_option('buildtype') == 'release'
lite_link_args += ['-static-libgcc', '-static-libstdc++']
endif