[llvm-branch-commits] [libcxx] 7ff7997 - [libc++] Disable incomplete features for the LLVM 14 release

2022-02-04 Thread Louis Dionne via llvm-branch-commits

Author: Louis Dionne
Date: 2022-02-04T15:26:57-05:00
New Revision: 7ff79971b98a5143cba81bcaebb2d5a70b3728c0

URL: 
https://github.com/llvm/llvm-project/commit/7ff79971b98a5143cba81bcaebb2d5a70b3728c0
DIFF: 
https://github.com/llvm/llvm-project/commit/7ff79971b98a5143cba81bcaebb2d5a70b3728c0.diff

LOG: [libc++] Disable incomplete features for the LLVM 14 release

For the LLVM 14 release, don't ship incomplete features (currently
ranges and format) by default. If some vendors want to ship those
features, they can override the CMake option manually. This is
consistent with what we did for LLVM 13.

Note that this patch is only aimed towards the release/14.x branch.

Differential Revision: https://reviews.llvm.org/D118901

Added: 


Modified: 
libcxx/CMakeLists.txt
libcxx/benchmarks/CMakeLists.txt
libcxx/docs/ReleaseNotes.rst
libcxx/include/module.modulemap

libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist

libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist

libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
libcxxabi/test/libcxxabi/test/config.py

Removed: 




diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 77df59e4cd755..183b3df621b42 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -133,7 +133,7 @@ option(LIBCXX_ENABLE_INCOMPLETE_FEATURES
 "Whether to enable support for incomplete library features. Incomplete 
features
 are new library features under development. These features don't guarantee
 ABI stability nor the quality of completed library features. Vendors
-shipping the library may want to disable this option." ON)
+shipping the library may want to disable this option." OFF)
 set(LIBCXX_TEST_CONFIG "legacy.cfg.in" CACHE STRING
 "The path to the Lit testing configuration to use when running the tests.
  If a relative path is provided, it is assumed to be relative to 
'/libcxx/test/configs'.")

diff  --git a/libcxx/benchmarks/CMakeLists.txt 
b/libcxx/benchmarks/CMakeLists.txt
index 8c8c9e4f186e0..95e28618b55e3 100644
--- a/libcxx/benchmarks/CMakeLists.txt
+++ b/libcxx/benchmarks/CMakeLists.txt
@@ -166,6 +166,11 @@ endfunction()
 # Register Benchmark tests
 #==
 file(GLOB BENCHMARK_TESTS "*.bench.cpp")
+
+if (NOT LIBCXX_ENABLE_INCOMPLETE_FEATURES)
+  list(FILTER BENCHMARK_TESTS EXCLUDE REGEX 
"(format_to_n|format_to|format|formatted_size|formatter_float|std_format_spec_string_unicode).bench.cpp")
+endif()
+
 foreach(test_path ${BENCHMARK_TESTS})
   get_filename_component(test_file "${test_path}" NAME)
   string(REPLACE ".bench.cpp" "" test_name "${test_file}")

diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index 8d645426138a2..a33c6621d448d 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -43,8 +43,9 @@ New Features
   functions are known to be inefficient, both in memory usage and performance.
   The implementation isn't API- or ABI-stable and therefore considered
   experimental. (Some not-yet-implemented papers require an API-break.)
-  Vendors can still disable this header by turning the CMake option
-  `LIBCXX_ENABLE_INCOMPLETE_FEATURES` off.
+  As a result, it is disabled by default, however vendors can enable the
+  header by using ``-DLIBCXX_ENABLE_INCOMPLETE_FEATURES=ON`` when
+  configuring their build.
 
 - There's a new CMake option ``LIBCXX_ENABLE_UNICODE`` to disable Unicode
   support in the  header. This only affects the estimation of the

diff  --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 84abf01bf5d75..749c17f8bc08f 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -2,7 +2,8 @@
 // since __config may be included from C headers which may create an
 // include cycle.
 module std_config [system] [extern_c] {
-header "__config"
+  textual header "__config"
+  textual header "__config_site"
 }
 
 module std [system] {

diff  --git 
a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
 
b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
index 6f5f50e997664..cb315f91f659a 100644
--- 
a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
+++ 
b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
@@ -1039,9 +1039,6 @@
 {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__112format_errorD0Ev', 'type': 'F

[llvm-branch-commits] [libcxx] 9f9ea70 - [libc++] No longer support ranges::begin(x) when x is an array of incomplete type.

2022-02-04 Thread Arthur O'Dwyer via llvm-branch-commits

Author: Arthur O'Dwyer
Date: 2022-02-04T16:12:35-05:00
New Revision: 9f9ea707d0c6f2839a52a7045a35ea3356d851be

URL: 
https://github.com/llvm/llvm-project/commit/9f9ea707d0c6f2839a52a7045a35ea3356d851be
DIFF: 
https://github.com/llvm/llvm-project/commit/9f9ea707d0c6f2839a52a7045a35ea3356d851be.diff

LOG: [libc++] No longer support ranges::begin(x) when x is an array of 
incomplete type.

var-const points out that `ranges::begin` is (non-normatively
but explicitly) always supposed to return a `std::input_or_output_iterator`,
and `Incomplete*` is not a `std::input_or_output_iterator` because it
has no `operator++`. Therefore, we should never return `Incomplete*`
from `ranges::begin(x)`, even when `x` is `Incomplete(&)[]`. Instead,
just SFINAE away.

Differential Revision: https://reviews.llvm.org/D118963

(cherry picked from commit cc1d02ba2d177e0d31561934337f5412167f6954)

Added: 


Modified: 
libcxx/include/__ranges/access.h
libcxx/test/std/ranges/range.access/begin.pass.cpp

Removed: 
libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp



diff  --git a/libcxx/include/__ranges/access.h 
b/libcxx/include/__ranges/access.h
index 67c6c57bd81e4..07a92d7834755 100644
--- a/libcxx/include/__ranges/access.h
+++ b/libcxx/include/__ranges/access.h
@@ -59,10 +59,17 @@ namespace __begin {
 
   struct __fn {
 template 
-  requires is_array_v>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp& __t) 
const noexcept
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp 
(&__t)[]) const noexcept
+  requires (sizeof(_Tp) != 0)  // Disallow incomplete element types.
 {
-  return __t;
+  return __t + 0;
+}
+
+template 
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp 
(&__t)[_Np]) const noexcept
+  requires (sizeof(_Tp) != 0)  // Disallow incomplete element types.
+{
+  return __t + 0;
 }
 
 template 
@@ -127,7 +134,7 @@ namespace __end {
   public:
 template 
 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp 
(&__t)[_Np]) const noexcept
-  requires (sizeof(*__t) != 0)  // Disallow incomplete element types.
+  requires (sizeof(_Tp) != 0)  // Disallow incomplete element types.
 {
   return __t + _Np;
 }

diff  --git 
a/libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp 
b/libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp
deleted file mode 100644
index cc27789c04f3d..0
--- a/libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//===--===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===--===//
-
-// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.tu1.o -DTU1
-// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.tu2.o -DTU2
-// RUN: %{cxx} %t.tu1.o %t.tu2.o %{flags} %{link_flags} -o %t.exe
-// RUN: %{exec} %t.exe
-
-// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-concepts
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
-
-// Test the libc++-specific behavior that we handle the IFNDR case for 
ranges::begin
-// by returning the beginning of the array-of-incomplete-type.
-// Use two translation units so that `Incomplete` really is never completed
-// at any point within TU2, but the array `bounded` is still given a definition
-// (in TU1) to avoid an "undefined reference" error from the linker.
-// All of the actually interesting stuff takes place within TU2.
-
-#include 
-#include 
-
-#include "test_macros.h"
-
-#if defined(TU1)
-
-struct Incomplete {};
-Incomplete bounded[10];
-Incomplete unbounded[10];
-
-#else // defined(TU1)
-
-struct Incomplete;
-
-constexpr bool test()
-{
-{
-extern Incomplete bounded[10];
-assert(std::ranges::begin(bounded) == bounded);
-assert(std::ranges::cbegin(bounded) == bounded);
-assert(std::ranges::begin(std::as_const(bounded)) == bounded);
-assert(std::ranges::cbegin(std::as_const(bounded)) == bounded);
-ASSERT_SAME_TYPE(decltype(std::ranges::begin(bounded)), Incomplete*);
-ASSERT_SAME_TYPE(decltype(std::ranges::cbegin(bounded)), const 
Incomplete*);
-ASSERT_SAME_TYPE(decltype(std::ranges::begin(std::as_const(bounded))), 
const Incomplete*);
-ASSERT_SAME_TYPE(decltype(std::ranges::cbegin(std::as_const(bounded))), 
const Incomplete*);
-}
-{
-extern Incomplete unbounded[];
-assert(std::ranges::begin(unbounded) == unbounded);
-assert(std::ranges::cbegin(unbounded) == unbounded);
-assert(std::ranges::begin(std::as_const(unbounded)) == unbounded);
-ass

[llvm-branch-commits] [compiler-rt] 62a6f40 - [msan] Guard FP_XSTATE_MAGIC1 usage with SANITIZER_GLIBC

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T15:15:30-08:00
New Revision: 62a6f40e14db35013b8ed36571f35fc62c759e9b

URL: 
https://github.com/llvm/llvm-project/commit/62a6f40e14db35013b8ed36571f35fc62c759e9b
DIFF: 
https://github.com/llvm/llvm-project/commit/62a6f40e14db35013b8ed36571f35fc62c759e9b.diff

LOG: [msan] Guard FP_XSTATE_MAGIC1 usage with SANITIZER_GLIBC

Fix build for Linux musl.

Reviewed By: #sanitizers, dvyukov

Differential Revision: https://reviews.llvm.org/D118970

(cherry picked from commit 9d1857f69f4ef00d9fd1b21660c20e00b993d06f)

Added: 


Modified: 
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
compiler-rt/test/msan/Linux/signal_mcontext.cpp
compiler-rt/test/msan/Linux/signal_mcontext2.cpp

Removed: 




diff  --git 
a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp 
b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
index 82048f0eae2e3..32b8f47ed6338 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -217,7 +217,7 @@ namespace __sanitizer {
   unsigned struct_sockaddr_sz = sizeof(struct sockaddr);
 
   unsigned ucontext_t_sz(void *ctx) {
-#if SANITIZER_LINUX && SANITIZER_X64
+#if SANITIZER_GLIBC && SANITIZER_X64
 // See kernel arch/x86/kernel/fpu/signal.c for details.
 const auto *fpregs = static_cast(ctx)->uc_mcontext.fpregs;
 // The member names 
diff er across header versions, but the actual layout

diff  --git a/compiler-rt/test/msan/Linux/signal_mcontext.cpp 
b/compiler-rt/test/msan/Linux/signal_mcontext.cpp
index 932b4b8c09775..b49451fbb730b 100644
--- a/compiler-rt/test/msan/Linux/signal_mcontext.cpp
+++ b/compiler-rt/test/msan/Linux/signal_mcontext.cpp
@@ -10,7 +10,7 @@
 
 void handler(int sig, siginfo_t *info, void *uctx) {
   __msan_check_mem_is_initialized(uctx, sizeof(ucontext_t));
-#if defined(__x86_64__)
+#if defined(__GLIBC__) && defined(__x86_64__)
   auto *mctx = &static_cast(uctx)->uc_mcontext;
   if (auto *fpregs = mctx->fpregs) {
 // The member names 
diff er across header versions, but the actual layout

diff  --git a/compiler-rt/test/msan/Linux/signal_mcontext2.cpp 
b/compiler-rt/test/msan/Linux/signal_mcontext2.cpp
index 6bb6740c6fa7c..f65f909c87ef1 100644
--- a/compiler-rt/test/msan/Linux/signal_mcontext2.cpp
+++ b/compiler-rt/test/msan/Linux/signal_mcontext2.cpp
@@ -1,6 +1,7 @@
 // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O1 %s -o %t && not 
%run %t 2>&1 | FileCheck %s
 
-// REQUIRES: x86_64-target-arch
+// musl does not define FP_XSTATE_MAGIC1.
+// REQUIRES: x86_64-target-arch && glibc-2.27
 
 #include 
 #include 



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] 7d59109 - [ELF] Support REL-format R_AARCH64_NONE relocation

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T15:16:05-08:00
New Revision: 7d591098479927023ea3a393bbd47e40e1a22246

URL: 
https://github.com/llvm/llvm-project/commit/7d591098479927023ea3a393bbd47e40e1a22246
DIFF: 
https://github.com/llvm/llvm-project/commit/7d591098479927023ea3a393bbd47e40e1a22246.diff

LOG: [ELF] Support REL-format R_AARCH64_NONE relocation

-fprofile-use=/-fprofile-sample-use= compiles may produce REL-format
.rel.llvm.call-graph-profile even if the prevailing format is RELA on AArch64.
Add R_AARCH64_NONE to getImplicitAddend to fix this linker error:

```
ld.lld: error: internal linker error: cannot read addend for relocation 
R_AARCH64_NONE
PLEASE submit a bug report to https://crbug.com and run 
tools/clang/scripts/process_crashreports.py (only works inside Google) which 
will upload a report and include the crash backtrace.
```

(cherry picked from commit f457863ae345d2635026501f5383e0e625869639)

Added: 
lld/test/ELF/relocation-none-aarch64.test

Modified: 
lld/ELF/Arch/AArch64.cpp

Removed: 
lld/test/ELF/relocation-none-aarch64.s



diff  --git a/lld/ELF/Arch/AArch64.cpp b/lld/ELF/Arch/AArch64.cpp
index 5789bc935b638..9e857d5906845 100644
--- a/lld/ELF/Arch/AArch64.cpp
+++ b/lld/ELF/Arch/AArch64.cpp
@@ -197,6 +197,8 @@ int64_t AArch64::getImplicitAddend(const uint8_t *buf, 
RelType type) const {
   switch (type) {
   case R_AARCH64_TLSDESC:
 return read64(buf + 8);
+  case R_AARCH64_NONE:
+return 0;
   default:
 internalLinkerError(getErrorLocation(buf),
 "cannot read addend for relocation " + toString(type));

diff  --git a/lld/test/ELF/relocation-none-aarch64.s 
b/lld/test/ELF/relocation-none-aarch64.s
deleted file mode 100644
index 7783c127cf867..0
--- a/lld/test/ELF/relocation-none-aarch64.s
+++ /dev/null
@@ -1,26 +0,0 @@
-# REQUIRES: aarch64
-
-# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-musl %s -o %t.o
-# RUN: ld.lld --gc-sections %t.o -o %t
-# RUN: llvm-readelf -S -r %t | FileCheck %s
-
-# Test that we discard R_AARCH64_NONE, but respect the references it creates
-# among sections.
-
-# CHECK: .data
-# CHECK: There are no relocations in this file.
-
-# RUN: ld.lld -r %t.o -o %t
-# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
-
-# RELOC:  Section ({{.*}}) .rela.text {
-# RELOC-NEXT:   0x0 R_AARCH64_NONE .data 0x0
-# RELOC-NEXT: }
-
-.globl _start
-_start:
-  ret
-  .reloc 0, R_AARCH64_NONE, .data
-
-.data
-  .long 0

diff  --git a/lld/test/ELF/relocation-none-aarch64.test 
b/lld/test/ELF/relocation-none-aarch64.test
new file mode 100644
index 0..0147085021f7a
--- /dev/null
+++ b/lld/test/ELF/relocation-none-aarch64.test
@@ -0,0 +1,69 @@
+# REQUIRES: aarch64
+# RUN: yaml2obj %s -o %t.o
+# RUN: ld.lld --gc-sections %t.o -o %t
+# RUN: llvm-readelf -S -r %t | FileCheck %s
+
+## Test that we discard R_AARCH64_NONE, but respect the references it creates
+## among sections.
+
+# CHECK: .data
+# CHECK: There are no relocations in this file.
+
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
+## Both REL and RELA are supported. .rel.llvm.call-graph-profile uses REL even
+## if the prevailing format is RELA.
+# RELOC:  Section ({{.*}}) .rela.text {
+# RELOC-NEXT:   0x0 R_AARCH64_NONE .data 0x0
+# RELOC-NEXT: }
+# RELOC:  Section ({{.*}}) .rel.nonalloc1 {
+# RELOC-NEXT:   0x0 R_AARCH64_NONE .data
+# RELOC-NEXT: }
+# RELOC:  Section ({{.*}}) .rela.nonalloc2 {
+# RELOC-NEXT:   0x0 R_AARCH64_NONE .data 0x0
+# RELOC-NEXT: }
+
+--- !ELF
+FileHeader:
+  Class:   ELFCLASS64
+  Data:ELFDATA2LSB
+  Type:ET_REL
+  Machine: EM_AARCH64
+Sections:
+  - Name:.text
+Type:SHT_PROGBITS
+Flags:   [ SHF_ALLOC, SHF_EXECINSTR ]
+  - Name:.data
+Type:SHT_PROGBITS
+Flags:   [ SHF_WRITE, SHF_ALLOC ]
+  - Name:.nonalloc1
+Type:SHT_PROGBITS
+  - Name:.nonalloc2
+Type:SHT_PROGBITS
+  - Name:.rela.text
+Type:SHT_RELA
+Info:.text
+Relocations:
+  - Symbol:  .data
+Type:R_AARCH64_NONE
+  - Name:.rel.nonalloc1
+Type:SHT_REL
+Info:.nonalloc1
+Relocations:
+  - Symbol:  .data
+Type:R_AARCH64_NONE
+  - Name:.rela.nonalloc2
+Type:SHT_RELA
+Info:.nonalloc2
+Relocations:
+  - Symbol:  .data
+Type:R_AARCH64_NONE
+Symbols:
+  - Name:.data
+Type:STT_SECTION
+Section: .data
+  - Name:_start
+Section: .text
+Binding: STB_GLOBAL
+...



___
llvm-branch-commits mailing lis

[llvm-branch-commits] [lld] 7ee59df - [ELF][test] Test getImplicitAddend for R_ARM_NONE/R_RISCV_NONE/R_386_NONE/R_X86_64_NONE

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T15:16:13-08:00
New Revision: 7ee59df38e38555bde58497ad6296f605a997831

URL: 
https://github.com/llvm/llvm-project/commit/7ee59df38e38555bde58497ad6296f605a997831
DIFF: 
https://github.com/llvm/llvm-project/commit/7ee59df38e38555bde58497ad6296f605a997831.diff

LOG: [ELF][test] Test getImplicitAddend for 
R_ARM_NONE/R_RISCV_NONE/R_386_NONE/R_X86_64_NONE

Similar to f457863ae345d2635026501f5383e0e625869639

(cherry picked from commit 3fd30958b79293f64545c7328c58982f959feb51)

Added: 
lld/test/ELF/relocation-none.test

Modified: 


Removed: 
lld/test/ELF/relocation-none-aarch64.test
lld/test/ELF/relocation-none-arm.s
lld/test/ELF/relocation-none-i386.s
lld/test/ELF/relocation-none-x86-64.s



diff  --git a/lld/test/ELF/relocation-none-arm.s 
b/lld/test/ELF/relocation-none-arm.s
deleted file mode 100644
index a3ebc3189b34e..0
--- a/lld/test/ELF/relocation-none-arm.s
+++ /dev/null
@@ -1,26 +0,0 @@
-# REQUIRES: arm
-
-# RUN: llvm-mc -filetype=obj -triple=armv7-linux-musl %s -o %t.o
-# RUN: ld.lld --gc-sections %t.o -o %t
-# RUN: llvm-readelf -S -r %t | FileCheck %s
-
-# Test that we discard R_ARM_NONE, but respect the references it creates among
-# sections.
-
-# CHECK: .data
-# CHECK: There are no relocations in this file.
-
-# RUN: ld.lld -r %t.o -o %t
-# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
-
-# RELOC:  Section ({{.*}}) .rel.text {
-# RELOC-NEXT:   0x0 R_ARM_NONE .data
-# RELOC-NEXT: }
-
-.globl _start
-_start:
-  nop
-  .reloc 0, R_ARM_NONE, .data
-
-.data
-  .long 0

diff  --git a/lld/test/ELF/relocation-none-i386.s 
b/lld/test/ELF/relocation-none-i386.s
deleted file mode 100644
index 54913b37ed8b5..0
--- a/lld/test/ELF/relocation-none-i386.s
+++ /dev/null
@@ -1,26 +0,0 @@
-# REQUIRES: x86
-
-# RUN: llvm-mc -filetype=obj -triple=i386-linux-musl %s -o %t.o
-# RUN: ld.lld --gc-sections %t.o -o %t
-# RUN: llvm-readelf -S -r %t | FileCheck %s
-
-# Test that we discard R_386_NONE, but respect the
-# references it creates among sections.
-
-# CHECK: .data
-# CHECK: There are no relocations in this file.
-
-# RUN: ld.lld -r %t.o -o %t
-# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
-
-# RELOC:  Section ({{.*}}) .rel.text {
-# RELOC-NEXT:   0x0 R_386_NONE .data
-# RELOC-NEXT: }
-
-.globl _start
-_start:
-  ret
-  .reloc 0, R_386_NONE, .data
-
-.data
-  .long 0

diff  --git a/lld/test/ELF/relocation-none-x86-64.s 
b/lld/test/ELF/relocation-none-x86-64.s
deleted file mode 100644
index be6b07c3f5022..0
--- a/lld/test/ELF/relocation-none-x86-64.s
+++ /dev/null
@@ -1,26 +0,0 @@
-# REQUIRES: x86
-
-# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-musl %s -o %t.o
-# RUN: ld.lld --gc-sections %t.o -o %t
-# RUN: llvm-readelf -S -r %t | FileCheck %s
-
-# Test that we discard R_X86_64_NONE, but respect the
-# references it creates among sections.
-
-# CHECK: .data
-# CHECK: There are no relocations in this file.
-
-# RUN: ld.lld -r %t.o -o %t
-# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
-
-# RELOC:  Section ({{.*}}) .rela.text {
-# RELOC-NEXT:   0x0 R_X86_64_NONE .data 0x0
-# RELOC-NEXT: }
-
-.globl _start
-_start:
-  ret
-  .reloc 0, R_X86_64_NONE, .data
-
-.data
-  .long 0

diff  --git a/lld/test/ELF/relocation-none-aarch64.test 
b/lld/test/ELF/relocation-none.test
similarity index 61%
rename from lld/test/ELF/relocation-none-aarch64.test
rename to lld/test/ELF/relocation-none.test
index 0147085021f7a..a9ba6402ae8de 100644
--- a/lld/test/ELF/relocation-none-aarch64.test
+++ b/lld/test/ELF/relocation-none.test
@@ -1,9 +1,8 @@
-# REQUIRES: aarch64
-# RUN: yaml2obj %s -o %t.o
+# RUN: yaml2obj -DMACHINE=AARCH64 %s -o %t.o
 # RUN: ld.lld --gc-sections %t.o -o %t
 # RUN: llvm-readelf -S -r %t | FileCheck %s
 
-## Test that we discard R_AARCH64_NONE, but respect the references it creates
+## Test that we discard R_*_NONE, but respect the references it creates
 ## among sections.
 
 # CHECK: .data
@@ -12,24 +11,40 @@
 # RUN: ld.lld -r %t.o -o %t
 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
 
+# RUN: yaml2obj -DBITS=32 -DMACHINE=ARM %s -o %t.o
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
+# RUN: yaml2obj -DMACHINE=RISCV %s -o %t.o
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
+# RUN: yaml2obj -DBITS=32 -DMACHINE=386 %s -o %t.o
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
+# RUN: yaml2obj -DMACHINE=X86_64 %s -o %t.o
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
 ## Both REL and RELA are supported. .rel.llvm.call-graph-profile uses REL even
 ## if the prevailing format is RELA.
 # RELOC:  Section ({{.*}}) .rela.text {
-# RELOC-NEXT:   0x0 R_AARCH64_NONE .data 0x0
+# RELOC-NEXT:   

[llvm-branch-commits] [llvm] 31868be - [yaml2obj] Support R_PPC_* relocation types

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T15:16:21-08:00
New Revision: 31868bef9568751f64a1e3855bb0ef5cd9e93041

URL: 
https://github.com/llvm/llvm-project/commit/31868bef9568751f64a1e3855bb0ef5cd9e93041
DIFF: 
https://github.com/llvm/llvm-project/commit/31868bef9568751f64a1e3855bb0ef5cd9e93041.diff

LOG: [yaml2obj] Support R_PPC_* relocation types

(cherry picked from commit c161b30f5c23ef9fe246d6bdf875c5a08cf2df9f)

Added: 
llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test

Modified: 
llvm/lib/ObjectYAML/ELFYAML.cpp

Removed: 




diff  --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index d597148b98ab4..3d4cd4088e9fc 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -839,6 +839,9 @@ void ScalarEnumerationTraits::enumeration(
   case ELF::EM_CSKY:
 #include "llvm/BinaryFormat/ELFRelocs/CSKY.def"
 break;
+  case ELF::EM_PPC:
+#include "llvm/BinaryFormat/ELFRelocs/PowerPC.def"
+break;
   case ELF::EM_PPC64:
 #include "llvm/BinaryFormat/ELFRelocs/PowerPC64.def"
 break;

diff  --git a/llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test 
b/llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test
new file mode 100644
index 0..594d2da6c387a
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test
@@ -0,0 +1,163 @@
+## Test that llvm-readobj shows proper relocation type
+## names and values for ppc target.
+
+# RUN: yaml2obj %s -o %t-ppc.o
+# RUN: llvm-readobj -r --expand-relocs %t-ppc.o | FileCheck %s
+
+# CHECK: Type: R_PPC_NONE (0)
+# CHECK: Type: R_PPC_ADDR32 (1)
+# CHECK: Type: R_PPC_ADDR24 (2)
+# CHECK: Type: R_PPC_ADDR16 (3)
+# CHECK: Type: R_PPC_ADDR16_LO (4)
+# CHECK: Type: R_PPC_ADDR16_HI (5)
+# CHECK: Type: R_PPC_ADDR16_HA (6)
+# CHECK: Type: R_PPC_ADDR14 (7)
+# CHECK: Type: R_PPC_ADDR14_BRTAKEN (8)
+# CHECK: Type: R_PPC_ADDR14_BRNTAKEN (9)
+# CHECK: Type: R_PPC_REL24 (10)
+# CHECK: Type: R_PPC_REL14 (11)
+# CHECK: Type: R_PPC_REL14_BRTAKEN (12)
+# CHECK: Type: R_PPC_REL14_BRNTAKEN (13)
+# CHECK: Type: R_PPC_GOT16 (14)
+# CHECK: Type: R_PPC_GOT16_LO (15)
+# CHECK: Type: R_PPC_GOT16_HI (16)
+# CHECK: Type: R_PPC_GOT16_HA (17)
+# CHECK: Type: R_PPC_PLTREL24 (18)
+# CHECK: Type: R_PPC_COPY (19)
+# CHECK: Type: R_PPC_GLOB_DAT (20)
+# CHECK: Type: R_PPC_JMP_SLOT (21)
+# CHECK: Type: R_PPC_RELATIVE (22)
+# CHECK: Type: R_PPC_LOCAL24PC (23)
+# CHECK: Type: R_PPC_UADDR32 (24)
+# CHECK: Type: R_PPC_UADDR16 (25)
+# CHECK: Type: R_PPC_REL32 (26)
+# CHECK: Type: R_PPC_PLT32 (27)
+# CHECK: Type: R_PPC_PLTREL32 (28)
+# CHECK: Type: R_PPC_PLT16_LO (29)
+# CHECK: Type: R_PPC_PLT16_HI (30)
+# CHECK: Type: R_PPC_PLT16_HA (31)
+# CHECK: Type: R_PPC_SDAREL16 (32)
+# CHECK: Type: R_PPC_SECTOFF (33)
+# CHECK: Type: R_PPC_SECTOFF_LO (34)
+# CHECK: Type: R_PPC_SECTOFF_HI (35)
+# CHECK: Type: R_PPC_SECTOFF_HA (36)
+# CHECK: Type: R_PPC_ADDR30 (37)
+# CHECK: Type: R_PPC_TLS (67)
+# CHECK: Type: R_PPC_DTPMOD32 (68)
+# CHECK: Type: R_PPC_TPREL16 (69)
+# CHECK: Type: R_PPC_TPREL16_LO (70)
+# CHECK: Type: R_PPC_TPREL16_HI (71)
+# CHECK: Type: R_PPC_TPREL16_HA (72)
+# CHECK: Type: R_PPC_TPREL32 (73)
+# CHECK: Type: R_PPC_DTPREL16 (74)
+# CHECK: Type: R_PPC_DTPREL16_LO (75)
+# CHECK: Type: R_PPC_DTPREL16_HI (76)
+# CHECK: Type: R_PPC_DTPREL16_HA (77)
+# CHECK: Type: R_PPC_DTPREL32 (78)
+# CHECK: Type: R_PPC_GOT_TLSGD16 (79)
+# CHECK: Type: R_PPC_GOT_TLSGD16_LO (80)
+# CHECK: Type: R_PPC_GOT_TLSGD16_HI (81)
+# CHECK: Type: R_PPC_GOT_TLSGD16_HA (82)
+# CHECK: Type: R_PPC_GOT_TLSLD16 (83)
+# CHECK: Type: R_PPC_GOT_TLSLD16_LO (84)
+# CHECK: Type: R_PPC_GOT_TLSLD16_HI (85)
+# CHECK: Type: R_PPC_GOT_TLSLD16_HA (86)
+# CHECK: Type: R_PPC_GOT_TPREL16 (87)
+# CHECK: Type: R_PPC_GOT_TPREL16_LO (88)
+# CHECK: Type: R_PPC_GOT_TPREL16_HI (89)
+# CHECK: Type: R_PPC_GOT_TPREL16_HA (90)
+# CHECK: Type: R_PPC_GOT_DTPREL16 (91)
+# CHECK: Type: R_PPC_GOT_DTPREL16_LO (92)
+# CHECK: Type: R_PPC_GOT_DTPREL16_HI (93)
+# CHECK: Type: R_PPC_GOT_DTPREL16_HA (94)
+# CHECK: Type: R_PPC_TLSGD (95)
+# CHECK: Type: R_PPC_TLSLD (96)
+# CHECK: Type: R_PPC_IRELATIVE (248)
+# CHECK: Type: R_PPC_REL16 (249)
+# CHECK: Type: R_PPC_REL16_LO (250)
+# CHECK: Type: R_PPC_REL16_HI (251)
+# CHECK: Type: R_PPC_REL16_HA (252)
+
+--- !ELF
+FileHeader:
+  Class:   ELFCLASS32
+  Data:ELFDATA2MSB
+  Type:ET_REL
+  Machine: EM_PPC
+Sections:
+  - Name: .rela.text
+Type: SHT_RELA
+Relocations:
+  - Type: R_PPC_NONE
+  - Type: R_PPC_ADDR32
+  - Type: R_PPC_ADDR24
+  - Type: R_PPC_ADDR16
+  - Type: R_PPC_ADDR16_LO
+  - Type: R_PPC_ADDR16_HI
+  - Type: R_PPC_ADDR16_HA
+  - Type: R_PPC_ADDR14
+  - Type: R_PPC_ADDR14_BRTAKEN
+  - Type: R_PPC_ADDR14_BRNTAKEN
+  - Type: R_PPC_REL24
+  - Type: R_PPC_REL14
+  - Type: R_PPC_REL14_BRTAKEN
+  - Type: R_PPC_REL14_BRNTAKEN
+  - Type: R_PPC_GOT16
+  - Type: R_PPC_GOT16_LO
+ 

[llvm-branch-commits] [lld] ff421be - [ELF] Support R_PPC_NONE/R_PPC64_NONE in getImplicitAddend

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T15:16:30-08:00
New Revision: ff421befd25827223952913d58e90d56e7779eb6

URL: 
https://github.com/llvm/llvm-project/commit/ff421befd25827223952913d58e90d56e7779eb6
DIFF: 
https://github.com/llvm/llvm-project/commit/ff421befd25827223952913d58e90d56e7779eb6.diff

LOG: [ELF] Support R_PPC_NONE/R_PPC64_NONE in getImplicitAddend

Similar to f457863ae345d2635026501f5383e0e625869639

(cherry picked from commit 53fc5d9b9a0110f097c6e9f7aa3bff3621eaf268)

Added: 


Modified: 
lld/ELF/Arch/PPC.cpp
lld/ELF/Arch/PPC64.cpp
lld/test/ELF/relocation-none.test

Removed: 




diff  --git a/lld/ELF/Arch/PPC.cpp b/lld/ELF/Arch/PPC.cpp
index 97e4d66331381..315ac7df608d0 100644
--- a/lld/ELF/Arch/PPC.cpp
+++ b/lld/ELF/Arch/PPC.cpp
@@ -30,6 +30,7 @@ class PPC final : public TargetInfo {
   RelExpr getRelExpr(RelType type, const Symbol &s,
  const uint8_t *loc) const override;
   RelType getDynRel(RelType type) const override;
+  int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override;
   void writeGotHeader(uint8_t *buf) const override;
   void writePltHeader(uint8_t *buf) const override {
 llvm_unreachable("should call writePPC32GlinkSection() instead");
@@ -275,6 +276,17 @@ RelType PPC::getDynRel(RelType type) const {
   return R_PPC_NONE;
 }
 
+int64_t PPC::getImplicitAddend(const uint8_t *buf, RelType type) const {
+  switch (type) {
+  case R_PPC_NONE:
+return 0;
+  default:
+internalLinkerError(getErrorLocation(buf),
+"cannot read addend for relocation " + toString(type));
+return 0;
+  }
+}
+
 static std::pair fromDTPREL(RelType type, uint64_t val) {
   uint64_t dtpBiasedVal = val - 0x8000;
   switch (type) {

diff  --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp
index d9e4fc97ea0be..c083484f42804 100644
--- a/lld/ELF/Arch/PPC64.cpp
+++ b/lld/ELF/Arch/PPC64.cpp
@@ -363,6 +363,7 @@ class PPC64 final : public TargetInfo {
   RelExpr getRelExpr(RelType type, const Symbol &s,
  const uint8_t *loc) const override;
   RelType getDynRel(RelType type) const override;
+  int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override;
   void writePltHeader(uint8_t *buf) const override;
   void writePlt(uint8_t *buf, const Symbol &sym,
 uint64_t pltEntryAddr) const override;
@@ -1059,6 +1060,17 @@ RelType PPC64::getDynRel(RelType type) const {
   return R_PPC64_NONE;
 }
 
+int64_t PPC64::getImplicitAddend(const uint8_t *buf, RelType type) const {
+  switch (type) {
+  case R_PPC64_NONE:
+return 0;
+  default:
+internalLinkerError(getErrorLocation(buf),
+"cannot read addend for relocation " + toString(type));
+return 0;
+  }
+}
+
 void PPC64::writeGotHeader(uint8_t *buf) const {
   write64(buf, getPPC64TocBase());
 }

diff  --git a/lld/test/ELF/relocation-none.test 
b/lld/test/ELF/relocation-none.test
index a9ba6402ae8de..4e808cc67c0d1 100644
--- a/lld/test/ELF/relocation-none.test
+++ b/lld/test/ELF/relocation-none.test
@@ -15,6 +15,14 @@
 # RUN: ld.lld -r %t.o -o %t
 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
 
+# RUN: yaml2obj -DBITS=32 -DMACHINE=PPC %s -o %t.o
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
+# RUN: yaml2obj -DMACHINE=PPC64 %s -o %t.o
+# RUN: ld.lld -r %t.o -o %t
+# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
+
 # RUN: yaml2obj -DMACHINE=RISCV %s -o %t.o
 # RUN: ld.lld -r %t.o -o %t
 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] 461fc8b - [Debuginfod] Fix curl_easy_init in -DLLVM_ENABLE_ASSERTIONS=off build after D112753

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T17:35:02-08:00
New Revision: 461fc8b4caabddde77d329333dfb21b7089f9d44

URL: 
https://github.com/llvm/llvm-project/commit/461fc8b4caabddde77d329333dfb21b7089f9d44
DIFF: 
https://github.com/llvm/llvm-project/commit/461fc8b4caabddde77d329333dfb21b7089f9d44.diff

LOG: [Debuginfod] Fix curl_easy_init in -DLLVM_ENABLE_ASSERTIONS=off build 
after D112753

(cherry picked from commit 3dd2d4c0a239ce78421d51491456cb1a075ad2f3)

Added: 


Modified: 
llvm/lib/Debuginfod/HTTPClient.cpp

Removed: 




diff  --git a/llvm/lib/Debuginfod/HTTPClient.cpp 
b/llvm/lib/Debuginfod/HTTPClient.cpp
index 65f457933b92d..cba342c9b3439 100644
--- a/llvm/lib/Debuginfod/HTTPClient.cpp
+++ b/llvm/lib/Debuginfod/HTTPClient.cpp
@@ -156,7 +156,8 @@ HTTPClient::HTTPClient() {
  "Must call HTTPClient::initialize() at the beginning of main().");
   if (Curl)
 return;
-  assert((Curl = curl_easy_init()) && "Curl could not be initialized.");
+  Curl = curl_easy_init();
+  assert(Curl && "Curl could not be initialized");
   // Set the callback hooks.
   curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, curlWriteFunction);
   curl_easy_setopt(Curl, CURLOPT_HEADERFUNCTION, curlHeaderFunction);



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] a3b31d8 - [Debuginfod][test] Fix debuginfod.test to use %python instead of python after D112759

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Fangrui Song
Date: 2022-02-04T17:35:13-08:00
New Revision: a3b31d895b79140aeefeaaddd67b0403c7a0ec70

URL: 
https://github.com/llvm/llvm-project/commit/a3b31d895b79140aeefeaaddd67b0403c7a0ec70
DIFF: 
https://github.com/llvm/llvm-project/commit/a3b31d895b79140aeefeaaddd67b0403c7a0ec70.diff

LOG: [Debuginfod][test] Fix debuginfod.test to use %python instead of python 
after D112759

(cherry picked from commit 42f9ca55dd487580cfd32d4b803315d789442442)

Added: 


Modified: 
llvm/test/tools/llvm-debuginfod-find/debuginfod.test

Removed: 




diff  --git a/llvm/test/tools/llvm-debuginfod-find/debuginfod.test 
b/llvm/test/tools/llvm-debuginfod-find/debuginfod.test
index e38913b78351b..d1c9c693c0e4a 100644
--- a/llvm/test/tools/llvm-debuginfod-find/debuginfod.test
+++ b/llvm/test/tools/llvm-debuginfod-find/debuginfod.test
@@ -2,13 +2,13 @@
 # RUN: rm -rf %t
 # RUN: mkdir %t
 # # Query the python server for artifacts
-# RUN: DEBUGINFOD_CACHE_PATH=%t python %s --server-path %S/Inputs \
+# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-path %S/Inputs \
 # RUN:   --tool-cmd 'llvm-debuginfod-find --dump --executable abcdef' | \
 # RUN:   FileCheck %s --check-prefix=EXECUTABLE
-# RUN: DEBUGINFOD_CACHE_PATH=%t python %s --server-path %S/Inputs \
+# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-path %S/Inputs \
 # RUN:   --tool-cmd 'llvm-debuginfod-find --dump --source=/directory/file.c 
abcdef' | \
 # RUN:   FileCheck %s --check-prefix=SOURCE
-# RUN: DEBUGINFOD_CACHE_PATH=%t python %s --server-path %S/Inputs \
+# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-path %S/Inputs \
 # RUN:   --tool-cmd 'llvm-debuginfod-find --dump --debuginfo abcdef' | \
 # RUN:   FileCheck %s --check-prefix=DEBUGINFO
 



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] 190be54 - [Driver] Default to -fno-math-errno for musl

2022-02-04 Thread Fangrui Song via llvm-branch-commits

Author: Alex Xu (Hello71)
Date: 2022-02-04T19:21:48-08:00
New Revision: 190be5457c905ca55100927d1f5846cd30cee87d

URL: 
https://github.com/llvm/llvm-project/commit/190be5457c905ca55100927d1f5846cd30cee87d
DIFF: 
https://github.com/llvm/llvm-project/commit/190be5457c905ca55100927d1f5846cd30cee87d.diff

LOG: [Driver] Default to -fno-math-errno for musl

musl does not set errno in math functions: 
https://wiki.musl-libc.org/mathematical-library.html, 
https://git.musl-libc.org/cgit/musl/tree/include/math.h?id=cfdfd5ea3ce14c6abf7fb22a531f3d99518b5a1b#n26.

Reviewed By: srhines, MaskRay

Differential Revision: https://reviews.llvm.org/D116753

(cherry picked from commit 38449c98f3d33dffdaf7e1feeb9dfdcf63b5126b)

Added: 


Modified: 
clang/lib/Driver/ToolChains/Linux.cpp
clang/test/Driver/fast-math.c

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Linux.cpp 
b/clang/lib/Driver/ToolChains/Linux.cpp
index af74b108e04ee..f85c04df4f6c9 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -687,7 +687,7 @@ bool Linux::IsAArch64OutlineAtomicsDefault(const ArgList 
&Args) const {
 }
 
 bool Linux::IsMathErrnoDefault() const {
-  if (getTriple().isAndroid())
+  if (getTriple().isAndroid() || getTriple().isMusl())
 return false;
   return Generic_ELF::IsMathErrnoDefault();
 }

diff  --git a/clang/test/Driver/fast-math.c b/clang/test/Driver/fast-math.c
index a66e9d0eca177..36ea8ecb52985 100644
--- a/clang/test/Driver/fast-math.c
+++ b/clang/test/Driver/fast-math.c
@@ -119,6 +119,8 @@
 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
 // RUN: %clang -### -target x86_64-linux-android -c %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
+// RUN: %clang -### -target x86_64-linux-musl -c %s 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
 // RUN: %clang -### -target amdgcn-amd-amdhsa -c %s 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
 // RUN: %clang -### -target amdgcn-amd-amdpal -c %s 2>&1 \



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits