build: various updates
* Upgrade waf to 2.0.14
* Sync default compiler flags with ndn-cxx
* Simplify compilation of unit-tests
Change-Id: I36508fc7d679a951342a3abfeb0c8cb18dbfda51
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 6b53d3c..9e045c3 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -129,6 +129,10 @@
def getGeneralFlags(self, conf):
flags = super(GccBasicFlags, self).getGeneralFlags(conf)
flags['CXXFLAGS'] += ['-std=c++14']
+ if Utils.unversioned_sys_platform() == 'linux':
+ flags['LINKFLAGS'] += ['-fuse-ld=gold']
+ elif Utils.unversioned_sys_platform() == 'freebsd':
+ flags['LINKFLAGS'] += ['-fuse-ld=lld']
return flags
def getDebugFlags(self, conf):
@@ -145,7 +149,7 @@
'-Wno-error=maybe-uninitialized', # Bug #1615
'-Wno-unused-parameter',
]
- flags['LINKFLAGS'] += ['-fuse-ld=gold', '-Wl,-O1']
+ flags['LINKFLAGS'] += ['-Wl,-O1']
return flags
def getOptimizedFlags(self, conf):
@@ -158,7 +162,7 @@
'-Wnon-virtual-dtor',
'-Wno-unused-parameter',
]
- flags['LINKFLAGS'] += ['-fuse-ld=gold', '-Wl,-O1']
+ flags['LINKFLAGS'] += ['-Wl,-O1']
return flags
class GccFlags(GccBasicFlags):
@@ -179,6 +183,8 @@
# Bug #4296
flags['CXXFLAGS'] += [['-isystem', '/usr/local/include'], # for Homebrew
['-isystem', '/opt/local/include']] # for MacPorts
+ if Utils.unversioned_sys_platform() == 'freebsd':
+ flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']] # Bug #4790
return flags
def getDebugFlags(self, conf):