enable --as-needed linking (#20619)
* only link as needed * a few more * need to fix order * everywhre * fix mac * update spinner + text * fix c2 build * another fix Co-authored-by: Comma Device <device@comma.ai>pull/20626/head
parent
73d45eb18a
commit
36d8c89ebf
|
@ -141,6 +141,10 @@ else:
|
|||
ccflags = []
|
||||
ldflags = []
|
||||
|
||||
# no --as-needed on mac linker
|
||||
if arch != "Darwin":
|
||||
ldflags += ["-Wl,--as-needed"]
|
||||
|
||||
# change pythonpath to this
|
||||
lenv["PYTHONPATH"] = Dir("#").path
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@ Import('env', 'arch', 'cereal', 'messaging', 'common', 'visionipc', 'gpucommon')
|
|||
|
||||
|
||||
logger_lib = env.Library('logger', ["logger.cc"])
|
||||
libs = [logger_lib, 'zmq', 'capnp', 'kj', 'z',
|
||||
libs = [logger_lib, common, cereal, messaging, visionipc,
|
||||
'zmq', 'capnp', 'kj', 'z',
|
||||
'avformat', 'avcodec', 'swscale', 'avutil',
|
||||
'yuv', 'bz2', 'OpenCL', common, cereal, messaging, visionipc]
|
||||
'yuv', 'bz2', 'OpenCL']
|
||||
|
||||
src = ['loggerd.cc']
|
||||
if arch in ["aarch64", "larch64"]:
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
Import('env', 'arch', 'cereal', 'messaging', 'common', 'gpucommon', 'visionipc')
|
||||
lenv = env.Clone()
|
||||
|
||||
libs = [cereal, messaging, common, 'OpenCL', 'SNPE', 'symphony-cpu', 'capnp', 'zmq', 'kj', 'yuv', gpucommon, visionipc]
|
||||
libs = [cereal, messaging, common, visionipc, gpucommon,
|
||||
'OpenCL', 'SNPE', 'symphony-cpu', 'capnp', 'zmq', 'kj', 'yuv']
|
||||
|
||||
def get_dlsym_offset():
|
||||
"""Returns the offset between dlopen and dlsym in libdl.so"""
|
||||
|
|
|
@ -2,8 +2,8 @@ import os
|
|||
Import('qt_env', 'arch', 'common', 'messaging', 'gpucommon', 'visionipc',
|
||||
'cereal', 'transformations')
|
||||
|
||||
base_libs = qt_env["LIBS"] + [gpucommon, common, 'zmq', 'capnp', 'kj', 'm', 'OpenCL', 'ssl', 'crypto', 'pthread',
|
||||
cereal, messaging, visionipc, transformations]
|
||||
base_libs = [gpucommon, common, cereal, messaging, visionipc, transformations, 'zmq',
|
||||
'capnp', 'kj', 'm', 'OpenCL', 'ssl', 'crypto', 'pthread'] + qt_env["LIBS"]
|
||||
if arch == 'aarch64':
|
||||
base_libs += ['log', 'utils', 'gui', 'ui', 'CB', 'gsl', 'adreno_utils', 'cutils', 'uuid']
|
||||
|
||||
|
@ -19,7 +19,7 @@ if arch != 'aarch64':
|
|||
widgets_src += ["qt/offroad/networking.cc", "qt/offroad/wifiManager.cc"]
|
||||
|
||||
widgets = qt_env.Library("qt_widgets", widgets_src, LIBS=base_libs)
|
||||
qt_libs = base_libs + [widgets]
|
||||
qt_libs = [widgets] + base_libs
|
||||
|
||||
# spinner and text window
|
||||
qt_env.Program("qt/text", ["qt/text.cc"], LIBS=qt_libs)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue