mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
tools/rules_go_facts.patch reverted 30099a6add3c ("Revert "Emit nogo facts into
a separate archive (#3789)""). This change does some adjustments to work with
up-to-date rules_go without reverting anything.
PiperOrigin-RevId: 751073734
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
commit 6df2a94ece32425f53ea6fecdca3af7148dcc48b
|
|
Author: Andrei Vagin <[email protected]>
|
|
Date: Wed Feb 5 20:18:13 2025 +0000
|
|
|
|
../gvisor/tools/rules_cgo.patch
|
|
|
|
diff --git a/go/private/rules/cgo.bzl b/go/private/rules/cgo.bzl
|
|
index b8fc93a6..3fec27e4 100644
|
|
--- a/go/private/rules/cgo.bzl
|
|
+++ b/go/private/rules/cgo.bzl
|
|
@@ -144,7 +144,12 @@ def cgo_configure(go, srcs, cdeps, cppopts, copts, cxxopts, clinkopts):
|
|
# libclntsh.dylib.12.1, users have to create a unversioned symbolic link,
|
|
# so it can be treated as a simple shared library too.
|
|
continue
|
|
+ # Make each object in the C libraries after this line to be included in the resulting
|
|
+ # binary object to guarantee necessary symbols (i.e. DPDK drivers) can be found.
|
|
+ lib_opts.append("-Wl,--whole-archive")
|
|
lib_opts.append(lib.path)
|
|
+ # Disable whole-archive for other libraries.
|
|
+ lib_opts.append("-Wl,--no-whole-archive")
|
|
clinkopts.extend(cc_link_flags)
|
|
|
|
elif hasattr(d, "objc"):
|