mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builder: use .dylib for -shared builds in macOS
This commit is contained in:
parent
104c278216
commit
b3f2c629c6
@ -44,6 +44,7 @@ fn gen_gitignore(name string) string {
|
|||||||
'main',
|
'main',
|
||||||
'$name',
|
'$name',
|
||||||
'*.so',
|
'*.so',
|
||||||
|
'*.dylib',
|
||||||
'*.dll'
|
'*.dll'
|
||||||
].join('\n')
|
].join('\n')
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,12 @@ fn (mut v Builder) cc() {
|
|||||||
if v.pref.is_shared {
|
if v.pref.is_shared {
|
||||||
linker_flags << '-shared'
|
linker_flags << '-shared'
|
||||||
a << '-fPIC' // -Wl,-z,defs'
|
a << '-fPIC' // -Wl,-z,defs'
|
||||||
|
$if macos {
|
||||||
|
v.pref.out_name += '.dylib'
|
||||||
|
} $else {
|
||||||
v.pref.out_name += '.so'
|
v.pref.out_name += '.so'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if v.pref.is_bare {
|
if v.pref.is_bare {
|
||||||
a << '-fno-stack-protector'
|
a << '-fno-stack-protector'
|
||||||
a << '-ffreestanding'
|
a << '-ffreestanding'
|
||||||
|
Loading…
Reference in New Issue
Block a user