]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson.build: compile with -fno-strict-aliasing obs-knot-resolver-bs4hbr/deployments/697
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 23 Mar 2020 10:37:28 +0000 (11:37 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 23 Mar 2020 10:37:28 +0000 (11:37 +0100)
I tested that older compilers don't refuse this option:
 - gcc 4.8 (as that's the default in CentOS 7)
 - llvm 3.8 (year 2016 is enough, I hope)

meson.build

index bddbe49ec18205e1dca8458b16dc4bcf469f0a16..aa961aa70b6e162e480ab34b761836d3eee82b33 100644 (file)
@@ -118,6 +118,14 @@ add_project_arguments(
   '-Werror=implicit-function-declaration', # Probably messed up includes; implicit functions are evil!
   '-fvisibility=hidden',
   '-DHAVE_ASPRINTF=' + have_asprintf.to_int().to_string(),
+
+  # libuv handles have aliasing problems; see:
+  # https://github.com/libuv/libuv/pull/2588/files#diff-04c6e90faac2675aa89e2176d2eec7d8
+  # https://github.com/libuv/libuv/issues/1230#issuecomment-569030944
+  # Performance impact in our case seems OK:
+  # https://gitlab.labs.nic.cz/knot/knot-resolver/-/merge_requests/962#note_147407
+  '-fno-strict-aliasing',
+
   language: 'c',
 )