aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-05-21 19:09:13 +0200
committerFlorin Coras <florin.coras@gmail.com>2020-05-27 18:46:27 +0000
commitec3a3f16e4cd3b33e2a409fb01b8d8826e05f9fa (patch)
treebd4059fba9842cf9d467e5fa9b3db9102ec3dae1 /src/vpp/vnet
parent5500d1d6502554229d0542b89b857777b3c1851e (diff)
build: make address sanitizer options configurable with cmake
Type: improvement Change-Id: I9ee0407e0634f773862dd65ff5d5594814294c2c Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vpp/vnet')
-rw-r--r--src/vpp/vnet/config.h.in21
-rw-r--r--src/vpp/vnet/main.c4
2 files changed, 23 insertions, 2 deletions
diff --git a/src/vpp/vnet/config.h.in b/src/vpp/vnet/config.h.in
new file mode 100644
index 00000000000..8eee6da4913
--- /dev/null
+++ b/src/vpp/vnet/config.h.in
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2020 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef included_vpp_vnet_config_h
+#define included_vpp_vnet_config_h
+
+#define VPP_SANITIZE_ADDR_OPTIONS "@VPP_SANITIZE_ADDR_OPTIONS@"
+
+#endif
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index a95d6a75993..f4cc5042d45 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -24,6 +24,7 @@
#include <vnet/plugin/plugin.h>
#include <vnet/ethernet/ethernet.h>
#include <vpp/app/version.h>
+#include <vpp/vnet/config.h>
#include <vpp/api/vpe_msg_enum.h>
#include <limits.h>
@@ -512,8 +513,7 @@ VLIB_CLI_COMMAND (show_bihash_command, static) =
const char *
__asan_default_options (void)
{
- return
- "unmap_shadow_on_exit=1:disable_coredump=0:abort_on_error=1:detect_leaks=0";
+ return VPP_SANITIZE_ADDR_OPTIONS;
}
#endif /* CLIB_SANITIZE_ADDR */