mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: pass -cflags to thirdparty building stage too
This commit is contained in:
parent
cec2173381
commit
049e228003
@ -369,17 +369,23 @@ fn find_c_compiler_default() string {
|
||||
}
|
||||
|
||||
fn find_c_compiler_thirdparty_options() string {
|
||||
if '-m32' in os.args{
|
||||
$if windows {
|
||||
return '-m32'
|
||||
}$else{
|
||||
return '-fPIC -m32'
|
||||
}
|
||||
}else{
|
||||
$if windows {
|
||||
return ''
|
||||
}$else{
|
||||
return '-fPIC'
|
||||
fullargs := env_vflags_and_os_args()
|
||||
mut cflags := get_cmdline_cflags( fullargs )
|
||||
$if !windows {
|
||||
cflags += ' -fPIC'
|
||||
}
|
||||
if '-m32' in fullargs {
|
||||
cflags += ' -m32'
|
||||
}
|
||||
return cflags
|
||||
}
|
||||
|
||||
fn get_cmdline_cflags(args []string) string {
|
||||
mut cflags := ''
|
||||
for ci, cv in args {
|
||||
if cv == '-cflags' {
|
||||
cflags += args[ci+1] + ' '
|
||||
}
|
||||
}
|
||||
return cflags
|
||||
}
|
||||
|
@ -849,12 +849,7 @@ fn new_v(args[]string) &V {
|
||||
files << f
|
||||
}
|
||||
|
||||
mut cflags := ''
|
||||
for ci, cv in args {
|
||||
if cv == '-cflags' {
|
||||
cflags += args[ci+1] + ' '
|
||||
}
|
||||
}
|
||||
cflags := get_cmdline_cflags(args)
|
||||
|
||||
rdir := os.realpath( dir )
|
||||
rdir_name := os.filename( rdir )
|
||||
|
Loading…
Reference in New Issue
Block a user