[clang] [clang] UEFI ABI fixes for X86_64 (PR #124992)

2025-01-29 Thread Roland McGrath via cfe-commits
@@ -74,7 +74,7 @@ static CCMangling getCallingConvMangling(const ASTContext &Context, if (FD->isMain() && FD->getNumParams() == 2) return CCM_WasmMainArgcArgv; - if (!Triple.isOSWindows() || !Triple.isX86()) + if (!Triple.isOSWindowsOrUEFI() || !Triple.isX86()

[clang] [clang] UEFI ABI fixes for X86_64 (PR #124992)

2025-01-29 Thread Roland McGrath via cfe-commits
@@ -5193,12 +5193,12 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, CC = CC_X86RegCall; break; case ParsedAttr::AT_MSABI: -CC = Context.getTargetInfo().getTriple().isOSWindows() ? CC_C : -

[clang] [llvm] [llvm] Enable TLSDESC by default on Fuchsia targets (PR #124990)

2025-01-29 Thread Roland McGrath via cfe-commits
https://github.com/frobtech approved this pull request. https://github.com/llvm/llvm-project/pull/124990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Enable TLSDESC by default on Fuchsia targets (PR #124990)

2025-01-29 Thread Roland McGrath via cfe-commits
@@ -1119,7 +1119,9 @@ class Triple { /// True if the target supports both general-dynamic and TLSDESC, and TLSDESC frobtech wrote: This comment is not precisely true of all `isOSFuchsia()` cases. That is, it says this is true only if the target supports non

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2025-01-12 Thread Roland McGrath via cfe-commits
@@ -713,8 +713,8 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo { X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : X86TargetInfo(Triple, Opts) { const bool IsX32 = getTriple().isX32(); -bool IsWinCOFF = -

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2025-01-10 Thread Roland McGrath via cfe-commits
@@ -713,8 +713,8 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo { X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : X86TargetInfo(Triple, Opts) { const bool IsX32 = getTriple().isX32(); -bool IsWinCOFF = -

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2025-01-07 Thread Roland McGrath via cfe-commits
@@ -820,43 +820,6 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo { } }; -// x86-64 UEFI target -class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo -: public UEFITargetInfo { -public: - UEFIX86_64TargetInfo(const llvm::Triple &Triple, const Tar

[clang] [Driver][UEFI] Enable Microsoft extensions (PR #121875)

2025-01-07 Thread Roland McGrath via cfe-commits
https://github.com/frobtech approved this pull request. LGTM given a driver test as Petr mentioned. https://github.com/llvm/llvm-project/pull/121875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [Driver][Fuchsia] Avoid "argument unused" warnings (PR #118416)

2024-12-03 Thread Roland McGrath via cfe-commits
https://github.com/frobtech updated https://github.com/llvm/llvm-project/pull/118416 >From 5a039fa6003a7612ddc6603192a121d92d3903cc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 2 Dec 2024 13:33:47 -0800 Subject: [PATCH] [Driver][Fuchsia] Avoid "argument unused" warnings There shoul

[clang] [Driver][Fuchsia] Avoid "argument unused" warnings (PR #118416)

2024-12-02 Thread Roland McGrath via cfe-commits
https://github.com/frobtech ready_for_review https://github.com/llvm/llvm-project/pull/118416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][Fuchsia] Avoid "argument unused" warnings (PR #118416)

2024-12-02 Thread Roland McGrath via cfe-commits
https://github.com/frobtech updated https://github.com/llvm/llvm-project/pull/118416 >From 5a039fa6003a7612ddc6603192a121d92d3903cc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 2 Dec 2024 13:33:47 -0800 Subject: [PATCH] [Driver][Fuchsia] Avoid "argument unused" warnings There shoul

[clang] [Driver][Fuchsia] Avoid "argument unused" warnings (PR #118416)

2024-12-02 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/118416 There should not be an error or warning reported for using redundant options to control what goes into the link. For example, -nolibc -nostdlib. >From 5a039fa6003a7612ddc6603192a121d92d3903cc Mon Sep 17 00:00

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98088)

2024-07-08 Thread Roland McGrath via cfe-commits
@@ -11,6 +11,8 @@ namespace clang::tidy::llvm_libc { const static llvm::StringRef RequiredNamespaceStart = "__llvm_libc"; +const static llvm::StringRef RequiredNamespaceHiddenMacroName = frobtech wrote: I think it would be better to call this one "...Namespac

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech closed https://github.com/llvm/llvm-project/pull/95499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech ready_for_review https://github.com/llvm/llvm-project/pull/95499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech updated https://github.com/llvm/llvm-project/pull/95499 >From c4e8968197c401f03baaed904d07a5ce77c19ace Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 2024 20:25:24 -0700 Subject: [PATCH] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targ

[clang] [clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (PR #95499)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/95499 This aligns Fuchsia targets with other similar OS targets such as Linux. Fuchsia's libc already uses unsigned rather than the compiler-provided __WINT_TYPE__ macro for its wint_t typedef, so this just makes the

[clang] [InstCombine] Add multi-use tests for shift-of-shift transform (NFC) (PR #95497)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech closed https://github.com/llvm/llvm-project/pull/95497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Add multi-use tests for shift-of-shift transform (NFC) (PR #95497)

2024-06-13 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/95497 Also drop irrelevant function attributes from tests. >From c4e8968197c401f03baaed904d07a5ce77c19ace Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 13 Jun 2024 20:25:24 -0700 Subject: [PATCH] [clang][F

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Roland McGrath via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-pc-linu

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-05 Thread Roland McGrath via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-pc-linu

[clang] [Sema] Provide `-fno-/-fvisibility-global-new-delete` option (PR #75364)

2024-01-03 Thread Roland McGrath via cfe-commits
frobtech wrote: > Actually I kind of prefer all these options to have `-fvisibility-` as a > prefix. Even if it doesn't read quite naturally, it strongly implies that the > options are related (which is true) and any lexically sorted list of options > will naturally group them together. WDYT @

[clang] [Sema] Provide `-fno-/-fvisibility-global-new-delete` option (PR #75364)

2023-12-19 Thread Roland McGrath via cfe-commits
frobtech wrote: The meaning that we want to make clear is that this toggles the special behavior of forcing the visibility of these symbols despite all the other mechanisms that usually control visibility for all other symbols. So perhaps `-fforced-global-new-delete-visibility` (or even `-ff

[clang] [Fuchsia] Build with -fvisibility=default (PR #67067)

2023-09-21 Thread Roland McGrath via cfe-commits
@@ -52,6 +52,7 @@ set(ENABLE_LINKER_BUILD_ID ON CACHE BOOL "") set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "") set(CMAKE_BUILD_TYPE Release CACHE STRING "") +set(CMAKE_CXX_VISIBILITY_PRESET default CACHE STRING "") frobtech wrote: It merits a comment here

[clang] [Fuchsia] Build with -fvisibility=default (PR #67067)

2023-09-21 Thread Roland McGrath via cfe-commits
https://github.com/frobtech edited https://github.com/llvm/llvm-project/pull/67067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Build with -fvisibility=default (PR #67067)

2023-09-21 Thread Roland McGrath via cfe-commits
https://github.com/frobtech approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/67067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Obey -fuse-ld=... for -print-prog-name=ld output (PR #66698)

2023-09-18 Thread Roland McGrath via cfe-commits
frobtech wrote: > Can you comment on what projects need this? Can't we fix the projects > instead? And what do they do with the linker path? Why don't they invoke the > clang driver to run a link action? They are legion. It comes from autoconf checks for libtool. It doesn't really matter why

[clang] [clang][Driver] Obey -fuse-ld=... for -print-prog-name=ld output (PR #66698)

2023-09-18 Thread Roland McGrath via cfe-commits
frobtech wrote: > I think the 2013 GCC feature adding -fuse-ld= made this change, which is, > frankly, strange. I wish that we don't this... It's too late now. Build system code in the wild uses `$CC -print-prog-name=ld` and then expects to be able to invoke that program to get the linker that

[clang] [clang][Driver] Obey -fuse-ld=... for -print-prog-name=ld output (PR #66698)

2023-09-18 Thread Roland McGrath via cfe-commits
https://github.com/frobtech ready_for_review https://github.com/llvm/llvm-project/pull/66698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Obey -fuse-ld=... for -print-prog-name=ld output (PR #66698)

2023-09-18 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/66698 GCC makes `-print-prog-name=ld` a special case that looks up the linker that will be used according to the `-fuse-ld=...` option state. This makes Clang follow suit. >From aff75e8f64c8d2515f5fc152b33d5be514568

[clang-tools-extra] 9d4162f - [clang-tidy] Add fix-it support to `llvmlibc-inline-function-decl`

2023-08-07 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2023-08-07T12:15:59-07:00 New Revision: 9d4162ff28b479c93d55df67bf38507bdc50a2d1 URL: https://github.com/llvm/llvm-project/commit/9d4162ff28b479c93d55df67bf38507bdc50a2d1 DIFF: https://github.com/llvm/llvm-project/commit/9d4162ff28b479c93d55df67bf38507bdc50a2d1.diff

[clang] f08d86f - [RISCV] Default to -fsanitize=shadow-call-stack for Fuchsia

2023-02-05 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2023-02-05T18:58:59-08:00 New Revision: f08d86fc7f4479d5f44d75c720201334682075b8 URL: https://github.com/llvm/llvm-project/commit/f08d86fc7f4479d5f44d75c720201334682075b8 DIFF: https://github.com/llvm/llvm-project/commit/f08d86fc7f4479d5f44d75c720201334682075b8.diff

[clang] 03ff435 - [RISCV] Default to -ffixed-x18 for Fuchsia

2023-02-05 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2023-02-05T18:51:18-08:00 New Revision: 03ff435da540b0feb8272784e05ce742831d5bc2 URL: https://github.com/llvm/llvm-project/commit/03ff435da540b0feb8272784e05ce742831d5bc2 DIFF: https://github.com/llvm/llvm-project/commit/03ff435da540b0feb8272784e05ce742831d5bc2.diff

[clang] 1a963d3 - [Driver] Make -moutline-atomics default for aarch64-fuchsia targets

2022-03-28 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2022-03-28T16:51:55-07:00 New Revision: 1a963d3278c2daab7e12125371442cd129c09954 URL: https://github.com/llvm/llvm-project/commit/1a963d3278c2daab7e12125371442cd129c09954 DIFF: https://github.com/llvm/llvm-project/commit/1a963d3278c2daab7e12125371442cd129c09954.diff

[clang] ff11f0a - [Clang] Pass -z rel to linker for Fuchsia

2021-11-10 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2021-11-10T13:31:22-08:00 New Revision: ff11f0aa5de1fffaec5f0dde53fad2ba333116b1 URL: https://github.com/llvm/llvm-project/commit/ff11f0aa5de1fffaec5f0dde53fad2ba333116b1 DIFF: https://github.com/llvm/llvm-project/commit/ff11f0aa5de1fffaec5f0dde53fad2ba333116b1.diff

[clang] 70764c0 - [CMake][Fuchsia] Install llvm-elfabi

2020-12-02 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2020-12-02T11:59:14-08:00 New Revision: 70764c02e474504e2ebfb5b230a3b2ccdbedc5c2 URL: https://github.com/llvm/llvm-project/commit/70764c02e474504e2ebfb5b230a3b2ccdbedc5c2 DIFF: https://github.com/llvm/llvm-project/commit/70764c02e474504e2ebfb5b230a3b2ccdbedc5c2.diff

[clang] cf36142 - [clang] Add missing header guard in

2020-11-10 Thread Roland McGrath via cfe-commits
Author: Roland McGrath Date: 2020-11-10T19:34:25-08:00 New Revision: cf36142d342a46689007df3b508b2ef059d76e46 URL: https://github.com/llvm/llvm-project/commit/cf36142d342a46689007df3b508b2ef059d76e46 DIFF: https://github.com/llvm/llvm-project/commit/cf36142d342a46689007df3b508b2ef059d76e46.diff

Re: [PATCH] D58326: [Driver][Gnu] Support -nolibc flag

2019-02-17 Thread Roland McGrath via cfe-commits
See https://fuchsia.googlesource.com/fuchsia/+/48c987febf4077e52985f1ce1edc957b39bc5481/zircon/public/gn/config/BUILD.gn#219 and https://fuchsia.googlesource.com/fuchsia/+/48c987febf4077e52985f1ce1edc957b39bc5481/zircon/public/gn/config/libc-dummy for what happens without it... On Sat, Feb 16, 201

Re: r255371 - Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled

2016-01-04 Thread Roland McGrath via cfe-commits
Kostya, do you remember the exact original case in glibc for 22830 and what glibc change fixed it? I vaguely recall the case, but not enough to find the actual change and compare it to the new scenarios. I suspect that the original case was easy to fix because it was just that the hidden_proto magi