mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builder: fix bug for incorrectly detecting tcc
as icc
, when V was installed in a path containing icc
(#17271)
This commit is contained in:
parent
dcb9c3beb3
commit
ba9a9fdc2a
@ -196,12 +196,14 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
ccoptions.is_cc_tcc = ccompiler.contains('tcc') || ccoptions.guessed_compiler == 'tcc'
|
||||
ccoptions.is_cc_gcc = ccompiler.contains('gcc') || ccoptions.guessed_compiler == 'gcc'
|
||||
ccoptions.is_cc_icc = ccompiler.contains('icc') || ccoptions.guessed_compiler == 'icc'
|
||||
ccoptions.is_cc_msvc = ccompiler.contains('msvc') || ccoptions.guessed_compiler == 'msvc'
|
||||
ccoptions.is_cc_clang = ccompiler.contains('clang') || ccoptions.guessed_compiler == 'clang'
|
||||
ccompiler_file_name := os.file_name(ccompiler)
|
||||
ccoptions.is_cc_tcc = ccompiler_file_name.contains('tcc') || ccoptions.guessed_compiler == 'tcc'
|
||||
ccoptions.is_cc_gcc = ccompiler_file_name.contains('gcc') || ccoptions.guessed_compiler == 'gcc'
|
||||
ccoptions.is_cc_icc = ccompiler_file_name.contains('icc') || ccoptions.guessed_compiler == 'icc'
|
||||
ccoptions.is_cc_msvc = ccompiler_file_name.contains('msvc')
|
||||
|| ccoptions.guessed_compiler == 'msvc'
|
||||
ccoptions.is_cc_clang = ccompiler_file_name.contains('clang')
|
||||
|| ccoptions.guessed_compiler == 'clang'
|
||||
// For C++ we must be very tolerant
|
||||
if ccoptions.guessed_compiler.contains('++') {
|
||||
ccoptions.args << '-fpermissive'
|
||||
|
Loading…
Reference in New Issue
Block a user