forked from sonic-net/sonic-swss-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[202205] Non recursive automake and Debian packaging changes (sonic-n…
…et#700) * Switch to using non-recursive automake This can help increase build parallelization. On my dev VM, this decreased the compilation time from 2:55 to about 2:28 (Bullseye, Python 2 disabled, -j12). Time improvements may be more noticeable on systems with more CPU cores. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Update debian packaging Update to using debhelper compat 12, remove some overrides that are no longer needed, use automatically-generated dbgsym packages, and disable the static build. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Always enable all hardening Make sure hardened build flags are always used. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Re-add libboost1.71-dev as a dependency, since the Buster slave containers have that installed instead of just libboost-dev Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> --------- Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
- Loading branch information
1 parent
643132e
commit 0089791
Showing
11 changed files
with
153 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
SUBDIRS = common pyext sonic-db-cli tests | ||
lib_LTLIBRARIES = | ||
bin_PROGRAMS = | ||
|
||
if DEBUG | ||
DBGFLAGS = -ggdb -DDEBUG | ||
else | ||
DBGFLAGS = -g -DNDEBUG | ||
endif | ||
|
||
SWIG_SOURCES = pyext/swsscommon.i | ||
SWIG_FLAG = -Wall -c++ -python -keyword | ||
if ARCH64 | ||
SWIG_FLAG += -DSWIGWORDSIZE64 | ||
endif | ||
|
||
CLEANFILES = | ||
|
||
include common/Makefile.am | ||
include pyext/Makefile.am | ||
include sonic-db-cli/Makefile.am | ||
include tests/Makefile.am | ||
|
||
|
||
ACLOCAL_AMFLAGS = -I m4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,71 @@ | ||
INCLUDES = -I $(top_srcdir) | ||
|
||
lib_LTLIBRARIES = libswsscommon.la | ||
lib_LTLIBRARIES += common/libswsscommon.la | ||
|
||
EXTRA_DIST = \ | ||
consumer_state_table_pops.lua \ | ||
consumer_table_pops.lua \ | ||
producer_state_table_apply_view.lua \ | ||
table_dump.lua \ | ||
redis_multi.lua \ | ||
portcounter.lua \ | ||
fdb_flush.lua \ | ||
fdb_flush.v2.lua | ||
dist_swss_DATA = \ | ||
common/consumer_state_table_pops.lua \ | ||
common/consumer_table_pops.lua \ | ||
common/producer_state_table_apply_view.lua \ | ||
common/table_dump.lua \ | ||
common/redis_multi.lua \ | ||
common/portcounter.lua \ | ||
common/fdb_flush.lua \ | ||
common/fdb_flush.v2.lua | ||
|
||
EXTRA_CONF_DIST = database_config.json | ||
dist_swsscommon_DATA= common/database_config.json | ||
|
||
swssdir = $(datadir)/swss | ||
swsscommondir = /var/run/redis/sonic-db | ||
|
||
dist_swss_DATA = $(EXTRA_DIST) | ||
dist_swsscommon_DATA = $(EXTRA_CONF_DIST) | ||
bin_PROGRAMS += common/swssloglevel | ||
|
||
bin_PROGRAMS = swssloglevel | ||
common_libswsscommon_la_SOURCES = \ | ||
common/logger.cpp \ | ||
common/redisreply.cpp \ | ||
common/configdb.cpp \ | ||
common/dbconnector.cpp \ | ||
common/dbinterface.cpp \ | ||
common/sonicv2connector.cpp \ | ||
common/table.cpp \ | ||
common/json.cpp \ | ||
common/producertable.cpp \ | ||
common/producerstatetable.cpp \ | ||
common/rediscommand.cpp \ | ||
common/redistran.cpp \ | ||
common/redisselect.cpp \ | ||
common/select.cpp \ | ||
common/selectableevent.cpp \ | ||
common/selectabletimer.cpp \ | ||
common/consumertable.cpp \ | ||
common/consumertablebase.cpp \ | ||
common/consumerstatetable.cpp \ | ||
common/ipaddress.cpp \ | ||
common/ipprefix.cpp \ | ||
common/ipaddresses.cpp \ | ||
common/macaddress.cpp \ | ||
common/netdispatcher.cpp \ | ||
common/netlink.cpp \ | ||
common/nfnetlink.cpp \ | ||
common/notificationconsumer.cpp \ | ||
common/notificationproducer.cpp \ | ||
common/linkcache.cpp \ | ||
common/portmap.cpp \ | ||
common/pubsub.cpp \ | ||
common/tokenize.cpp \ | ||
common/exec.cpp \ | ||
common/saiaclschema.cpp \ | ||
common/subscriberstatetable.cpp \ | ||
common/timestamp.cpp \ | ||
common/warm_restart.cpp \ | ||
common/luatable.cpp \ | ||
common/countertable.cpp \ | ||
common/redisutility.cpp | ||
|
||
if DEBUG | ||
DBGFLAGS = -ggdb -DDEBUG | ||
else | ||
DBGFLAGS = -g -DNDEBUG | ||
endif | ||
common_libswsscommon_la_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) | ||
common_libswsscommon_la_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) | ||
common_libswsscommon_la_LIBADD = -lpthread $(LIBNL_LIBS) $(CODE_COVERAGE_LIBS) | ||
|
||
libswsscommon_la_SOURCES = \ | ||
logger.cpp \ | ||
redisreply.cpp \ | ||
configdb.cpp \ | ||
dbconnector.cpp \ | ||
dbinterface.cpp \ | ||
sonicv2connector.cpp \ | ||
table.cpp \ | ||
json.cpp \ | ||
producertable.cpp \ | ||
producerstatetable.cpp \ | ||
rediscommand.cpp \ | ||
redistran.cpp \ | ||
redisselect.cpp \ | ||
select.cpp \ | ||
selectableevent.cpp \ | ||
selectabletimer.cpp \ | ||
consumertable.cpp \ | ||
consumertablebase.cpp \ | ||
consumerstatetable.cpp \ | ||
ipaddress.cpp \ | ||
ipprefix.cpp \ | ||
ipaddresses.cpp \ | ||
macaddress.cpp \ | ||
netdispatcher.cpp \ | ||
netlink.cpp \ | ||
nfnetlink.cpp \ | ||
notificationconsumer.cpp \ | ||
notificationproducer.cpp \ | ||
linkcache.cpp \ | ||
portmap.cpp \ | ||
pubsub.cpp \ | ||
tokenize.cpp \ | ||
exec.cpp \ | ||
saiaclschema.cpp \ | ||
subscriberstatetable.cpp \ | ||
timestamp.cpp \ | ||
warm_restart.cpp \ | ||
luatable.cpp \ | ||
countertable.cpp \ | ||
redisutility.cpp | ||
common_swssloglevel_SOURCES = common/loglevel.cpp | ||
|
||
libswsscommon_la_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CFLAGS) $(CODE_COVERAGE_CXXFLAGS) | ||
libswsscommon_la_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(LIBNL_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) | ||
libswsscommon_la_LIBADD = -lpthread $(LIBNL_LIBS) $(CODE_COVERAGE_LIBS) | ||
|
||
swssloglevel_SOURCES = loglevel.cpp | ||
|
||
swssloglevel_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS) | ||
swssloglevel_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CPPFLAGS) | ||
swssloglevel_LDADD = libswsscommon.la $(CODE_COVERAGE_LIBS) | ||
common_swssloglevel_CXXFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS) | ||
common_swssloglevel_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CODE_COVERAGE_CPPFLAGS) | ||
common_swssloglevel_LDADD = common/libswsscommon.la $(CODE_COVERAGE_LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10 | ||
12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
SUBDIRS = py3 | ||
if PYTHON2 | ||
SUBDIRS += py2 | ||
include pyext/py2/Makefile.am | ||
endif | ||
|
||
ACLOCAL_AMFLAGS = -I m4 | ||
include pyext/py3/Makefile.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
SWIG_SOURCES = ../swsscommon.i | ||
pkgpython_PYTHON = pyext/py2/swsscommon.py pyext/py2/__init__.py | ||
pkgpyexec_LTLIBRARIES = pyext/py2/_swsscommon.la | ||
|
||
pkgpython_PYTHON = swsscommon.py __init__.py | ||
pkgpyexec_LTLIBRARIES = _swsscommon.la | ||
pyext_py2__swsscommon_la_SOURCES = pyext/py2/swsscommon_wrap.cpp | ||
pyext_py2__swsscommon_la_CPPFLAGS = -std=c++11 -Icommon -I/usr/include/python$(PYTHON_VERSION) | ||
pyext_py2__swsscommon_la_LDFLAGS = -module | ||
pyext_py2__swsscommon_la_LIBADD = common/libswsscommon.la -lpython$(PYTHON_VERSION) | ||
|
||
_swsscommon_la_SOURCES = swsscommon_wrap.cpp | ||
_swsscommon_la_CPPFLAGS = -std=c++11 -I../../common -I/usr/include/python$(PYTHON_VERSION) | ||
_swsscommon_la_LDFLAGS = -module | ||
_swsscommon_la_LIBADD = ../../common/libswsscommon.la -lpython$(PYTHON_VERSION) | ||
pyext/py2/swsscommon_wrap.cpp: $(SWIG_SOURCES) | ||
$(SWIG) $(SWIG_FLAG) -Icommon -o $@ $< | ||
|
||
SWIG_FLAG = -Wall -c++ -python -keyword | ||
if ARCH64 | ||
SWIG_FLAG += -DSWIGWORDSIZE64 | ||
endif | ||
|
||
swsscommon_wrap.cpp: $(SWIG_SOURCES) | ||
$(SWIG) $(SWIG_FLAG) -I../../common -o $@ $< | ||
|
||
CLEANFILES = swsscommon_wrap.cpp | ||
CLEANFILES += pyext/py2/swsscommon_wrap.cpp pyext/py2/swsscommon.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
SWIG_SOURCES = ../swsscommon.i | ||
pkgpython3_PYTHON = pyext/py3/swsscommon.py pyext/py3/__init__.py | ||
pkgpy3exec_LTLIBRARIES = pyext/py3/_swsscommon.la | ||
|
||
pkgpython3_PYTHON = swsscommon.py __init__.py | ||
pkgpy3exec_LTLIBRARIES = _swsscommon.la | ||
pyext_py3__swsscommon_la_SOURCES = pyext/py3/swsscommon_wrap.cpp | ||
pyext_py3__swsscommon_la_CPPFLAGS = -std=c++11 -Icommon -I/usr/include/python$(PYTHON3_VERSION) | ||
pyext_py3__swsscommon_la_LDFLAGS = -module | ||
pyext_py3__swsscommon_la_LIBADD = common/libswsscommon.la $(PYTHON3_BLDLIBRARY) | ||
|
||
_swsscommon_la_SOURCES = swsscommon_wrap.cpp | ||
_swsscommon_la_CPPFLAGS = -std=c++11 -I../../common -I/usr/include/python$(PYTHON3_VERSION) | ||
_swsscommon_la_LDFLAGS = -module | ||
_swsscommon_la_LIBADD = ../../common/libswsscommon.la $(PYTHON3_BLDLIBRARY) | ||
pyext/py3/swsscommon_wrap.cpp: $(SWIG_SOURCES) | ||
$(SWIG) $(SWIG_FLAG) -Icommon -o $@ $< | ||
|
||
SWIG_FLAG = -Wall -c++ -python -keyword | ||
if ARCH64 | ||
SWIG_FLAG += -DSWIGWORDSIZE64 | ||
endif | ||
|
||
swsscommon_wrap.cpp: $(SWIG_SOURCES) | ||
$(SWIG) $(SWIG_FLAG) -I../../common -o $@ $< | ||
|
||
CLEANFILES = swsscommon_wrap.cpp | ||
CLEANFILES += pyext/py3/swsscommon_wrap.cpp pyext/py3/swsscommon.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
INCLUDES = -I $(top_srcdir) | ||
lib_LTLIBRARIES += sonic-db-cli/libsonicdbcli.la | ||
sonic_db_cli_libsonicdbcli_la_SOURCES = sonic-db-cli/sonic-db-cli.cpp | ||
sonic_db_cli_libsonicdbcli_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) | ||
sonic_db_cli_libsonicdbcli_la_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) | ||
sonic_db_cli_libsonicdbcli_la_LIBADD = common/libswsscommon.la -lpthread | ||
|
||
if DEBUG | ||
DBGFLAGS = -ggdb -DDEBUG | ||
else | ||
DBGFLAGS = -g -DNDEBUG | ||
endif | ||
|
||
lib_LTLIBRARIES = libsonicdbcli.la | ||
libsonicdbcli_la_SOURCES = sonic-db-cli.cpp | ||
libsonicdbcli_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) | ||
libsonicdbcli_la_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) | ||
libsonicdbcli_la_LDFLAGS = -L$(top_srcdir)/common -lswsscommon -lpthread | ||
|
||
bin_PROGRAMS = sonic-db-cli | ||
sonic_db_cli_SOURCES = sonic-db-cli.cpp main.cpp | ||
sonic_db_cli_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) | ||
sonic_db_cli_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) | ||
sonic_db_cli_LDFLAGS = -L$(top_srcdir)/common -lswsscommon -lpthread | ||
bin_PROGRAMS += sonic-db-cli/sonic-db-cli | ||
sonic_db_cli_sonic_db_cli_SOURCES = sonic-db-cli/sonic-db-cli.cpp sonic-db-cli/main.cpp | ||
sonic_db_cli_sonic_db_cli_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) | ||
sonic_db_cli_sonic_db_cli_CPPFLAGS = $(DBGFLAGS) $(AM_CPPFLAGS) $(CFLAGS_COMMON) | ||
sonic_db_cli_sonic_db_cli_LDADD = common/libswsscommon.la -lpthread |
Oops, something went wrong.