From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8EC7145B4D; Wed, 16 Oct 2024 13:39:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58E8D40652; Wed, 16 Oct 2024 13:38:57 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 361074064C for ; Wed, 16 Oct 2024 13:38:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729078735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tR4RXO40Wt0MNQB+mtTUWv3XJTbN9yUY5uFRtXMfSKA=; b=G6SPokPJj5PRLTcNf5CKkYiud2AJwbNLLVW1QVzQG2/wZB5pvW3rlVNOqeCMNtuXCo/NZ7 KH+IV/I4cE9e1fUd20qRnOa0lit7Jhy30J18uiiXY/hDYXkZPgnXe8S+MxGhUqJzsO13yc bxCcrUqkuIYg0BOSPcwbPi5pP4Ftg6o= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-339-VwT7rxfYMH2wW9A-IwcU1w-1; Wed, 16 Oct 2024 07:38:54 -0400 X-MC-Unique: VwT7rxfYMH2wW9A-IwcU1w-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9E7A11956048; Wed, 16 Oct 2024 11:38:53 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.57]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0D8A219560AE; Wed, 16 Oct 2024 11:38:51 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, ktraynor@redhat.com Subject: [PATCH v2 4/4] buildtools/chkincs: check headers with stable API only Date: Wed, 16 Oct 2024 13:38:16 +0200 Message-ID: <20241016113817.3956187-5-david.marchand@redhat.com> In-Reply-To: <20241016113817.3956187-1-david.marchand@redhat.com> References: <20241015121046.2556695-1-david.marchand@redhat.com> <20241016113817.3956187-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org An exported header should be usable w/ and w/o ALLOW_EXPERIMENTAL_API so that an application that only wants stable API may include it. Plus, the widely common case is that an application will not use internal API. Cover those cases but keep the original test. Signed-off-by: David Marchand --- buildtools/chkincs/meson.build | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build index 8da221fc33..787d70272b 100644 --- a/buildtools/chkincs/meson.build +++ b/buildtools/chkincs/meson.build @@ -12,8 +12,6 @@ gen_c_files = generator(gen_c_file_for_header, arguments: ['@INPUT@', '@OUTPUT@']) cflags = machine_args -cflags += '-DALLOW_EXPERIMENTAL_API' -cflags += '-DALLOW_INTERNAL_API' sources = files('main.c') sources += gen_c_files.process(dpdk_chkinc_headers) @@ -32,6 +30,18 @@ executable('chkincs', sources, dependencies: deps, install: false) +executable('chkincs-exp', sources, + c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'], + include_directories: includes, + dependencies: deps, + install: false) + +executable('chkincs-all', sources, + c_args: [cflags, '-DALLOW_EXPERIMENTAL_API', '-DALLOW_INTERNAL_API'], + include_directories: includes, + dependencies: deps, + install: false) + # run tests for c++ builds also if not add_languages('cpp', required: false) subdir_done() @@ -49,3 +59,16 @@ executable('chkincs-cpp', cpp_sources, include_directories: includes, dependencies: deps, install: false) + +executable('chkincs-cpp-exp', cpp_sources, + cpp_args: ['-include', 'rte_config.h', cflags, '-DALLOW_EXPERIMENTAL_API'], + include_directories: includes, + dependencies: deps, + install: false) + +executable('chkincs-cpp-all', cpp_sources, + cpp_args: ['-include', 'rte_config.h', cflags, '-DALLOW_EXPERIMENTAL_API', + '-DALLOW_INTERNAL_API'], + include_directories: includes, + dependencies: deps, + install: false) -- 2.46.2