builder: use .dylib for -shared builds in macOS
parent
104c278216
commit
b3f2c629c6
|
@ -44,6 +44,7 @@ fn gen_gitignore(name string) string {
|
|||
'main',
|
||||
'$name',
|
||||
'*.so',
|
||||
'*.dylib',
|
||||
'*.dll'
|
||||
].join('\n')
|
||||
}
|
||||
|
|
|
@ -147,8 +147,12 @@ fn (mut v Builder) cc() {
|
|||
if v.pref.is_shared {
|
||||
linker_flags << '-shared'
|
||||
a << '-fPIC' // -Wl,-z,defs'
|
||||
$if macos {
|
||||
v.pref.out_name += '.dylib'
|
||||
} $else {
|
||||
v.pref.out_name += '.so'
|
||||
}
|
||||
}
|
||||
if v.pref.is_bare {
|
||||
a << '-fno-stack-protector'
|
||||
a << '-ffreestanding'
|
||||
|
|
Loading…
Reference in New Issue