Skip to content

Commit a8e2beb

Browse files
committed
build: fix default flags for Apple clang
Change-Id: I397bb601b6b60083e2a0793215145fdcbffb029a
1 parent fa9e434 commit a8e2beb

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

.waf-tools/default-compiler-flags.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,13 @@ def getGeneralFlags(self, conf):
224224
['-isystem', f'{brewdir}/include'], # for Homebrew
225225
['-isystem', '/opt/local/include'], # for MacPorts
226226
]
227-
elif Utils.unversioned_sys_platform() == 'freebsd':
228-
# Bug #4790
229-
flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
230-
if get_compiler_ver(conf) >= (18, 0, 0) and get_compiler_ver(conf) < (20, 1, 0):
231-
# Bug #5300
232-
flags['CXXFLAGS'] += ['-Wno-enum-constexpr-conversion']
227+
else:
228+
if Utils.unversioned_sys_platform() == 'freebsd':
229+
# Bug #4790
230+
flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
231+
if get_compiler_ver(conf) >= (18, 0, 0) and get_compiler_ver(conf) < (20, 1, 0):
232+
# Bug #5300
233+
flags['CXXFLAGS'] += ['-Wno-enum-constexpr-conversion']
233234
return flags
234235

235236
__cxxFlags = [
@@ -240,11 +241,13 @@ def getGeneralFlags(self, conf):
240241
def getDebugFlags(self, conf):
241242
flags = super().getDebugFlags(conf)
242243
flags['CXXFLAGS'] += self.__cxxFlags
244+
ccver = get_compiler_ver(conf)
245+
darwin = Utils.unversioned_sys_platform() == 'darwin'
243246
# Enable assertions in libc++
244-
if get_compiler_ver(conf) >= (18, 0, 0):
247+
if (darwin and ccver >= (17, 0, 0)) or (not darwin and ccver >= (18, 0, 0)):
245248
# https://libcxx.llvm.org/Hardening.html
246249
flags['DEFINES'] += ['_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE']
247-
elif get_compiler_ver(conf) >= (15, 0, 0):
250+
elif ccver >= (15, 0, 0):
248251
# https://releases.llvm.org/15.0.0/projects/libcxx/docs/UsingLibcxx.html#enabling-the-safe-libc-mode
249252
flags['DEFINES'] += ['_LIBCPP_ENABLE_ASSERTIONS=1']
250253
# Tell libc++ to avoid including transitive headers

docs/doxygen.conf.in

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,18 +2158,6 @@ DOT_GRAPH_MAX_NODES = 50
21582158

21592159
MAX_DOT_GRAPH_DEPTH = 0
21602160

2161-
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2162-
# background. This is disabled by default, because dot on Windows does not seem
2163-
# to support this out of the box.
2164-
#
2165-
# Warning: Depending on the platform used, enabling this option may lead to
2166-
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2167-
# read).
2168-
# The default value is: NO.
2169-
# This tag requires that the tag HAVE_DOT is set to YES.
2170-
2171-
DOT_TRANSPARENT = YES
2172-
21732161
# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
21742162
# files in one run (i.e. multiple -o and -T options on the command line). This
21752163
# makes dot run faster, but since only newer versions of dot (>1.8.10) support

0 commit comments

Comments
 (0)