diff --git a/compiler/cc.v b/compiler/cc.v index 3593fe1700..5750cf9520 100644 --- a/compiler/cc.v +++ b/compiler/cc.v @@ -119,6 +119,7 @@ fn (v mut V) cc() { a << '-mmacosx-version-min=10.7' } cflags := v.get_os_cflags() + // add .o files for flag in cflags { if !flag.value.ends_with('.o') { continue } @@ -315,6 +316,17 @@ fn find_c_compiler_default() string { } fn find_c_compiler_thirdparty_options() string { - $if windows { return '' } - return '-fPIC' + if '-m32' in os.args{ + $if windows { + return '-m32' + }$else{ + return '-fPIC -m32' + } + }else{ + $if windows { + return '' + }$else{ + return '-fPIC' + } + } }