1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: C++ compiler support

This commit is contained in:
Uwe Krüger
2020-05-18 15:51:36 +02:00
committed by GitHub
parent 857276e81f
commit 9a237c3e82
32 changed files with 268 additions and 150 deletions

View File

@@ -306,6 +306,11 @@ fn (mut v Builder) cc() {
// add all flags (-I -l -L etc) not .o files
a << cflags.c_options_without_object_files()
a << libs
// For C++ we must be very tolerant
if guessed_compiler.contains('++') {
a << '-fpermissive'
a << '-w'
}
if v.pref.use_cache {
//vexe := pref.vexe_path()
@@ -344,7 +349,7 @@ fn (mut v Builder) cc() {
if !v.pref.is_bare && v.pref.os == .js && os.user_os() == 'linux' {
linker_flags << '-lm'
}
args := a.join(' ') + linker_flags.join(' ')
args := a.join(' ') + ' ' + linker_flags.join(' ')
start:
todo()
// TODO remove