vppinfra: don't fail if config.h is missing, fallback to defaults instead

Type: improvement
Change-Id: Idc82d40a16cbc8a401a8fb359bc63083f47361b9
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2021-04-28 17:30:51 +02:00
committed by Florin Coras
parent df6d986f81
commit edca8c6e75
3 changed files with 7 additions and 7 deletions

View File

@ -1,16 +1,12 @@
#/bin/env bash
src=$(realpath $(dirname $0)/../..)/src
tmp=$(mktemp -d)
mkdir ${tmp}/vppinfra
touch ${tmp}/vppinfra/config.h
${CC:-cc} \
-O2 \
-flto \
-static \
-I ${src} \
-I ${tmp} \
${src}/vppinfra/backtrace.c \
${src}/vppinfra/dlmalloc.c \
${src}/vppinfra/elf.c \
@ -29,6 +25,3 @@ ${CC:-cc} \
${src}/vppinfra/linux/mem.c \
${src}/vpp/app/vppctl.c \
-o vppctl
rm ${tmp}/vppinfra/config.h
rmdir ${tmp}/vppinfra ${tmp}

View File

@ -39,7 +39,10 @@
#define included_clib_h
#include <stddef.h>
#if __has_include(<vppinfra/config.h>)
#include <vppinfra/config.h>
#endif
#ifdef __x86_64__
#include <x86intrin.h>

View File

@ -38,6 +38,10 @@
#include <vppinfra/vec.h>
#include <vppinfra/mem.h>
#ifndef CLIB_VECTOR_GROW_BY_ONE
#define CLIB_VECTOR_GROW_BY_ONE 0
#endif
/* Vector resize operator. Called as needed by various macros such as
vec_add1() when we need to allocate memory. */
__clib_export void *