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

v.builder: fix linker flags for systems with Procursus (#13865)

This commit is contained in:
Cameron Katri 2022-03-30 03:15:52 -04:00 committed by GitHub
parent cc637e5ee8
commit 3e69d3813b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,9 @@ $if $pkgconfig('openssl') {
// Brew arm64
#flag darwin -I /opt/homebrew/opt/openssl/include
#flag darwin -L /opt/homebrew/opt/openssl/lib
// Procursus
#flag darwin -I/opt/procursus/include
#flag darwin -L/opt/procursus/lib
//
#include <openssl/rand.h> # Please install OpenSSL development headers
#include <openssl/ssl.h>

View File

@ -203,6 +203,9 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
if v.pref.os == .ios {
ccoptions.args << '-fobjc-arc'
}
if v.pref.os == .macos && os.exists('/opt/procursus') {
ccoptions.linker_flags << '-Wl,-rpath,/opt/procursus/lib'
}
ccoptions.debug_mode = v.pref.is_debug
ccoptions.guessed_compiler = v.pref.ccompiler
if ccoptions.guessed_compiler == 'cc' && v.pref.is_prod {