From patchwork Sat Dec 16 10:17:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3531 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:8d12:b0:fc:24ac:f0cb with SMTP id i18csp8491687dys; Sat, 16 Dec 2023 02:18:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGL4xKw/67g428mBDUmgL1Rhp8XPJInoBlED8mCO3fmmBWVS59hMB8wesq5FldMkMzqFTry X-Received: by 2002:a05:6a20:9184:b0:18b:4b84:3a1 with SMTP id v4-20020a056a20918400b0018b4b8403a1mr30267775pzd.5.1702721887436; Sat, 16 Dec 2023 02:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702721887; cv=none; d=google.com; s=arc-20160816; b=hrl6JD9qKqUiAhit/5PjZtAHcaphwi2Fcr9+rFM2FDs/aUpd7pVkq52kwZKq2AbNIo xVqrOmsdU/YtNxc2lOVDvB+giaqwPvnCuiEFNc7r49LY6Yh6Sv60ebUVBa9bU5fyDk+H aF1lJf4Ylo53018oUCE2NG9x94S6TIAy0BYFuVPYXWHkiMp9xi0nnLUBGgNhsWXXvJhM xUSlMPoNocF0rJeji7he5En3Ca6qMg2RHxwqBCxxaVBcEWOyMDaqvOyy1FkicwaXEmLx 4rg5bVc3tg/ganc/31+iWbxW6R45xHgtrDdLHomOxcLzPmeGV7gPU+/1YcVavJqknvzB 4qrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=rlBbOirvrAqy8UeDNWrmM2Q+0BjiyIXJFw7VuEPIH8I=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=p0yDJFDh4GR9uXTDaP3A7HAib81AGCwXDVrHZ/rQaWsyp6tfcGswWKGtb2OB43/2Td Mn3saOnY3IgFY358MvZzSWg/WmM4Smh7WPz6fbVadbY60bJJMogAermRhMMyb4n4NA8j BNk2lPz1xF0U1vZ+EE17tXpiDD8ZEhDC/tbeDH/TQ/EzyByfOCXYSm4BpUmj7CLOb0nb Z1K0GL92hvLXjGhDI9XxReFUvjGKFXYEHbnv6CzEgl65hBBrFhLAO0Yw1jlVkcVJKdwS QFwdyccrFMVFk7v3AVw2GL2BL2AGu6a59375CNnGpUvp6uq+Md+CprLIuCCNsu/ZR89y PlxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=YxonhkuA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=G2HY1w20; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=XtqdzCf+; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id bw24-20020a056a00409800b006d30f25ddd4si869087pfb.271.2023.12.16.02.18.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Dec 2023 02:18:07 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=YxonhkuA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=G2HY1w20; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=XtqdzCf+; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rERjm-0000Hf-NN; Sat, 16 Dec 2023 10:17:37 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rERjk-0000HZ-Jz for openvpn-devel@lists.sourceforge.net; Sat, 16 Dec 2023 10:17:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0gPYFHNj3gMVoyjWVjxoVsrUq+KVVWC3IRPgVigoMRo=; b=YxonhkuAm8nfqvfCdNwYFiIuIq uCsBNitbFpEs6xV3oICAnteFdGNY7L7fiFPSrQZBaIjsawUsaf5JKlj0PnimmJM9HUPPQvozAhiBl 5n64J6SsDxvZCRysFi6gRWy8O8yR2a9Ro+oX0cT1AZFSbumj61ReiiPnNMmUHR0XkZ90=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=0gPYFHNj3gMVoyjWVjxoVsrUq+KVVWC3IRPgVigoMRo=; b=G 2HY1w20d9kSQMezmx0HeaMshFpuQmwEvcAfiikBMxUn+DQbdoiQzUVZLUOPStbGwm0IGclvWJvSjx b0zTAexTrR0A4aM57eW/eQRq6Jn0a7csKFQjPZ4V7QWAmu1RmYe9n/JwLXZRExsUELxI4MyyisGWH iy5BCUQBUT1mwfSA=; Received: from mail-wr1-f54.google.com ([209.85.221.54]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1rERjh-00048G-PO for openvpn-devel@lists.sourceforge.net; Sat, 16 Dec 2023 10:17:35 +0000 Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-333536432e0so1317679f8f.3 for ; Sat, 16 Dec 2023 02:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1702721842; x=1703326642; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=0gPYFHNj3gMVoyjWVjxoVsrUq+KVVWC3IRPgVigoMRo=; b=XtqdzCf+QNHcYoNy5Mfi+8KkakE8IgkpxfQYCCtiij4JDdI0Pg3548G25MAOhKrdBH hkH4yi6CCSu2D4RqTzCoRH06nGguFdMq3e4tOHF4geVNtrwYhmzZluBe3AHb3i6n2VyO HtvOyWnf8A8bDPka4ugnYQlePG5gee/oi1fPsL6O+VjJOyPzzkRJVN+X9tLLiiM3aQMQ nZHhOah4Nz+xn+B11uRvn9zEX2D5+N18pJ9s8ulV8CHpb06m0dl3tZd6owEl75c5kL12 asN/i0q+9FHNDcbSXtHqQp20iK+Yxiah7Kp+eOovqy97+Oaa9yAiBp+KHTKvo5ww0tGE uwUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702721842; x=1703326642; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0gPYFHNj3gMVoyjWVjxoVsrUq+KVVWC3IRPgVigoMRo=; b=lVBBvm6/sCQfeb8HdY8UQ7dq34ld2Q/7K8zCSNgCqhTP93wSoPnW160e6siLDovI1N odq6YIcidhUZJBEXRO7IXuJ8e4Lp/qLcSJiROQe8ZD0O4UvZz5F4EOS2HKkTd7sEk5L2 qT2BjCTiHkvdHJDp12NBk4rRiROkw+FNitehb+7Kzkdksw40qrsekKu9wV9RKhLNh/s7 LQGwVA3zWcJbOo5oSy0rL4Ni6XldMqQl1Ecy60nFiDufhMNaTDCbbF7uM+7QtCwiz4kL svk+Q2xYJwhGrn2DJtqTHfYoICdIRFwGH2YX6fuugMZQpz0u9yCEkdzPGTwkHtWx7XgH w8yw== X-Gm-Message-State: AOJu0YztaLQYjexutmkQ9BhDkXJ8N69Ia1v22ltP4V/t7i40WM5G4/Kp 5ZKCsqcq2Fhwn+ILUU55RBRg6xwLNAYNmUN1C4g= X-Received: by 2002:a05:600c:304a:b0:40c:233f:e02a with SMTP id n10-20020a05600c304a00b0040c233fe02amr7177155wmh.7.1702721842365; Sat, 16 Dec 2023 02:17:22 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id d9-20020adfef89000000b0033342978c93sm21169856wro.30.2023.12.16.02.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 02:17:21 -0800 (PST) From: "d12fk (Code Review)" X-Google-Original-From: "d12fk (Code Review)" X-Gerrit-PatchSet: 1 Date: Sat, 16 Dec 2023 10:17:21 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Ib14c1161b4b0c9df797b9932ad14739e202cea64 X-Gerrit-Change-Number: 483 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 355ac0ffc8ca489be9fbcc2b5a5dcac59581722e References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.54 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.54 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1rERjh-00048G-PO Subject: [Openvpn-devel] [XS] Change in openvpn[master]: create and (sym)link compile_commands.json file X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: heiko@openvpn.net, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1785433305963252089?= X-GMAIL-MSGID: =?utf-8?q?1785433305963252089?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/483?usp=email to review the following change. Change subject: create and (sym)link compile_commands.json file ...................................................................... create and (sym)link compile_commands.json file CMake has support to create a json file which contains exact information how each file in the project is compiled. This file can be consumed by clangd, which in turn provides precise symbol information to IDEs for better code navigation and contextual information. I use it with vscode to be able to quickly switch between native Linux and mingw builds and have the symbols info change dynamically with it. So handy that I think it is useful for others as well. Change-Id: Ib14c1161b4b0c9df797b9932ad14739e202cea64 Signed-off-by: Heiko Hund --- M CMakeLists.txt 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/83/483/1 diff --git a/CMakeLists.txt b/CMakeLists.txt index d40b213..bc46c27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) set(CMAKE_CONFIGURATION_TYPES "Release;Debug;ASAN") project(openvpn) @@ -42,6 +42,11 @@ set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the plugin directory") +# Create machine readable compile commands +set(CMAKE_EXPORT_COMPILE_COMMANDS 1) +file(CREATE_LINK ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json + ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json SYMBOLIC) + # AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to build with ASAN set(CMAKE_C_FLAGS_ASAN "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"