From 3e69d3813b8c7f4736295687c3cdce30ab9b6fbd Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Wed, 30 Mar 2022 03:15:52 -0400 Subject: [PATCH] v.builder: fix linker flags for systems with Procursus (#13865) --- vlib/net/openssl/c.v | 3 +++ vlib/v/builder/cc.v | 3 +++ 2 files changed, 6 insertions(+) diff --git a/vlib/net/openssl/c.v b/vlib/net/openssl/c.v index be2f7eeecc..3effc4f9f3 100644 --- a/vlib/net/openssl/c.v +++ b/vlib/net/openssl/c.v @@ -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 # Please install OpenSSL development headers #include diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index 5c90fdbc11..00830104f4 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -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 {