Skip to content

Commit

Permalink
Merge "Include libcpuinfo with -whole-archive link flags" into R2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 16, 2016
2 parents 32da6e6 + d811a09 commit 5b5934e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/analytics/SConscript
Expand Up @@ -123,6 +123,7 @@ if sys.platform != 'darwin':
buildinfo_dep_libs += [ '../../lib/libtbb_debug.so.2' ]
AnalyticsEnv.Prepend(LINKFLAGS =
['-Wl,--whole-archive',
'-lcpuinfo',
'-l:librdkafka.a', '-l:librdkafka++.a',
'-Wl,--no-whole-archive'])

Expand Down
2 changes: 1 addition & 1 deletion src/dns/SConscript
Expand Up @@ -41,7 +41,7 @@ env.Append(LIBPATH=libs)
if sys.platform != 'darwin':
env.Prepend(LINKFLAGS =
['-Wl,--whole-archive',
'-lifmap_server', '-rdynamic',
'-lcpuinfo', '-lifmap_server', '-rdynamic',
'-Wl,--no-whole-archive'])

contrail_dns = env.Program(target = 'contrail-dns', source = ['main.cc'])
Expand Down
9 changes: 9 additions & 0 deletions src/query_engine/SConscript
Expand Up @@ -133,6 +133,15 @@ env.GenerateBuildInfoCode(

build_obj = map(lambda x : env.Object(x), ['buildinfo.cc'])

lib_cpuinfo = File('../base/libcpuinfo.a')
if sys.platform != 'darwin':
env.Prepend(LINKFLAGS =
['-Wl,--whole-archive',
'-lcpuinfo',
'-Wl,--no-whole-archive'])
else:
env.Prepend(LINKFLAGS = ['-Wl,-force_load,' + lib_cpuinfo.path])

qed = env.Program(
target = 'qed',
source = qed_objs + qed_except_objs + build_obj +
Expand Down

0 comments on commit 5b5934e

Please sign in to comment.