From patchwork Fri Sep 25 14:28:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11799889 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1F941580 for ; Fri, 25 Sep 2020 14:28:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 906C520BED for ; Fri, 25 Sep 2020 14:28:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YHkKpUBC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728986AbgIYO2t (ORCPT ); Fri, 25 Sep 2020 10:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728977AbgIYO2r (ORCPT ); Fri, 25 Sep 2020 10:28:47 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 644D1C0613D5 for ; Fri, 25 Sep 2020 07:28:47 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id k15so3792137wrn.10 for ; Fri, 25 Sep 2020 07:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=A7/vEiSfbruVzpIjxqhvsJGFYNIJMT4r2lhIkZ+V9Eg=; b=YHkKpUBChgdmOPW7YwfZe9FNQk5awBC+Y2lD/VhfegafYkRx+u4ZlDDnBNDFfocvIR nuJ6kz8qdMW5Wnhcz1E32olVikxfLxYiF8DV7z+Aj2LfudHCwGZtDsdszhbbhi/K5JGX gW+38UmMnE42yNlSvbh22/msaEpkZB64rj5LLNftjX+pGZWj/051loouP08ay1yNXNaZ yVhgHrMVQvBOqz7Oxj+ZSu2AfFRNqeu56YRi4Z14ejovYT/gHf2MYd03of95F6XpE5kL c/TAtI81U67FL8XE8P4wBIKFpw7Ak4JmQRVEydh0VljVdX+xXImXCMLIAsnZt9nEMllu Y47Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=A7/vEiSfbruVzpIjxqhvsJGFYNIJMT4r2lhIkZ+V9Eg=; b=Sh0Ex/bPidkVWshwKZ5pnfspZ2+ZxDSzZC6ZI2BfwJXb1eChBounFU8i61ac3k86Da Lp6Wc8YTg82ZDGMWhUeVf9z/iQKjCkFqKt9n5pZt0+f2LC2YS2Jf33OZs/0NsTaf7HGA QFiXjmu6U0ZWznlJEc20TXkKAHocZ3xENUDTZx8ozDRWPaSlDh2dIKD6h8e3s3We38dc KOs+qSlI3uupNT5DDy1Ikb/JFbQt+KN7msZoBkxkdLTrqVpRhPcL/EMw29dxTEd56Kvw EQcE04ZhzRsV4Cl9blFmvOqzvgilXJo13Yyk7hPpmDv+IKIhLy1rI36BukGWfjt3vdTY zGDQ== X-Gm-Message-State: AOAM533RI9tR+wgzDWlU40tP1DFLkj7AmKDZACjibfFEX4ITfJl63nAs dQo4ziXzyyDWrD8MjBT3kadlYQZ7i9M= X-Google-Smtp-Source: ABdhPJyr5zthRmE9JlPbNHM23QTeI9htGGf1tLpSb1fG+BlRx10LFIxpYmFLf6j9xRZSTJT2CSQXLQ== X-Received: by 2002:a5d:4486:: with SMTP id j6mr4680832wrq.278.1601044125910; Fri, 25 Sep 2020 07:28:45 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u186sm3122898wmu.34.2020.09.25.07.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 07:28:45 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Fri, 25 Sep 2020 14:28:35 +0000 Subject: [PATCH 07/10] cmake (Windows): complain when encountering an unknown compiler Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin We have some custom handling regarding the link options, which are specific to each compiler. Therefore: let's not just continue without setting the link options when configuring for a currently unhandled compiler, but error out. Note: for some reason, the `invalidcontinue.obj` trick seems not to work in this developer's hands when building Git in Debug mode: the assertion dialog that is supposed to be suppressed still pops up, complaining about the `entry` variable being uninitialized when it is used in `config.c`'s line 1961. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 5a4e0ccb01..d21849b730 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -620,6 +620,8 @@ if(WIN32) target_link_options(common-main PUBLIC -municode -Wl,-nxcompat -Wl,-dynamicbase -Wl,-entry:wmainCRTStartup -Wl,invalidcontinue.obj) elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") target_link_options(common-main PUBLIC /IGNORE:4217 /IGNORE:4049 /NOLOGO /ENTRY:wmainCRTStartup /SUBSYSTEM:CONSOLE invalidcontinue.obj) + else() + message(FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID}") endif() elseif(UNIX) target_link_libraries(common-main pthread rt)