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 0EE9343E7C; Mon, 15 Apr 2024 18:45:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34EBB402F0; Mon, 15 Apr 2024 18:45:49 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2AF564021E for ; Mon, 15 Apr 2024 18:45:46 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 4A71020FC5F5; Mon, 15 Apr 2024 09:45:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4A71020FC5F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713199545; bh=WHWeS/WwdY2kwAiQyt0ygvB2I3iV4Jri6rSwEQ8y6iQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iahJMnFTRZOfPvCoO/hLxFVdiyqe7sgB0uwS95kC9Xjt13sDOsT14VZbfGPKsSpmU gJ1VnUTiOnD5TZfOT1T60OMOnI9zFFvagGY8eeIsv7dzrM2REXG9rigp/ROi/EGxKZ gmJHO7VGznTGxGtzEZG4n/nU+9GI7h3CBmZLsqTg= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Harman Kalra , Tyler Retzlaff Subject: [PATCH v4 0/2] build and install only one library type on Windows Date: Mon, 15 Apr 2024 09:45:41 -0700 Message-Id: <1713199543-30038-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710445477-23848-1-git-send-email-roretzla@linux.microsoft.com> References: <1710445477-23848-1-git-send-email-roretzla@linux.microsoft.com> 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 MSVC is the only compiler that can produce usable shared libraries for DPDK on Windows because of the use of exported TLS variables. Disable building of shared libraries with LLVM and MinGW so that remaining __declspec macros needed for the functional libraries built by MSVC can be used without triggering errors in LLVM and MinGW builds. For Windows only install the default_library type to avoid confusion. Windows builds cannot build both shared and static in a single pass so install only the functional variant MSVC does not guarantee any kind of compatibility for static libraries so they should not be packaged and instead they should be rebuilt along with the application using the same version of the compiler & linker. Because of this we have chosen to build only one library type at a time instead of compiling twice to produce both types in a single pass. v4: * use add_project_link_arguments() and move addition of linker and compiler arguments required only dynamic linking to block where it is determined is_shared_enabled=true and don't specify when is_shared_enabled=false. * unconditionally initialize shared_deps = {} and get rid of else leg of conditional evaluation in drivers/meson.build and lib/meson.build. * drop change to octeontx meson.build. v3: * condense library, target and toolchain type logic determining values for is_shared_enabled,install_{static,shared} values. * define empty shared_dep object to allow unconditional evaluation of shared variables even when is_shared_enabled is false. * use default_library() string to determine deps for chkincs. Tyler Retzlaff (2): build: build only one library type on Windows buildtools: when building static library use static deps app/meson.build | 4 +++ buildtools/chkincs/meson.build | 5 +-- config/meson.build | 21 +++++++++++++ drivers/meson.build | 62 +++++++++++++++++------------------- examples/meson.build | 4 +++ lib/meson.build | 71 ++++++++++++++++++------------------------ 6 files changed, 90 insertions(+), 77 deletions(-) -- 1.8.3.1