[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-19 Thread Brian Cain via cfe-commits

https://github.com/androm3da closed 
https://github.com/llvm/llvm-project/pull/85359
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 5bc4b34 - [clang][hexagon] Handle library path arguments earlier

2023-08-07 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2023-08-07T18:18:59-07:00
New Revision: 5bc4b34a3aa9c6ea10663a252ac46d20862b38d5

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

LOG: [clang][hexagon] Handle library path arguments earlier

The removal of the early return in 96832a6bf7e0e7f1e8d634d38c44a1b32d512923
was an error: it would include the 'standalone' library that's not used
by linux.

Instead we reproduce the library path handling in the linux/musl block.

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

Added: 


Modified: 
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/test/Driver/hexagon-toolchain-linux.c

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index dab7382532520a..aed4ab1955b4f3 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -383,6 +383,11 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
   if (HTC.ShouldLinkCXXStdlib(Args))
 HTC.AddCXXStdlibLibArgs(Args, CmdArgs);
 }
+const ToolChain::path_list  = HTC.getFilePaths();
+for (const auto  : LibPaths)
+  CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
+Args.ClaimAllArgs(options::OPT_L);
+return;
   }
 
   
//

diff  --git a/clang/test/Driver/hexagon-toolchain-linux.c 
b/clang/test/Driver/hexagon-toolchain-linux.c
index 61a5581b009c23..423306affdce3a 100644
--- a/clang/test/Driver/hexagon-toolchain-linux.c
+++ b/clang/test/Driver/hexagon-toolchain-linux.c
@@ -120,8 +120,12 @@
 // CHECK009-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]/include"
 // CHECK009-SAME: {{^}} "-internal-externc-isystem" 
"[[INSTALLED_DIR]]/../target/hexagon/include"
 
-// RUN: %clang -fdriver-only -Werror -v -L/tmp \
-// RUN:--target=hexagon-unknown-linux-musl %s 2>&1 \
+// RUN: %clang -Werror -L/tmp \
+// RUN:--target=hexagon-unknown-linux-musl %s -### 2>&1 \
 // RUN:| FileCheck -check-prefix=CHECK010 %s
 // CHECK010:   InstalledDir: [[INSTALLED_DIR:.+]]
+// CHECK010-NOT:  "-lstandalone"
+// CHECK010-NOT:  crt0_standalone.o
+// CHECK010:   crt1.o
 // CHECK010:   "-L/tmp"
+// CHECK010-NOT:  "-lstandalone"



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 96832a6 - [hexagon] restore library path arguments

2023-07-27 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2023-07-27T13:26:28-07:00
New Revision: 96832a6bf7e0e7f1e8d634d38c44a1b32d512923

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

LOG: [hexagon] restore library path arguments

Before applying this fix, clang would not include the specified library
path arguments:

$ ./bin/clang --target=hexagon-unknown-linux-musl  -o tprog tprog.o -L/tmp 
-###
...
clang: warning: argument unused during compilation: '-L/tmp' 
[-Wunused-command-line-argument]
 "/local/mnt/workspace/install/clang-latest/bin/ld.lld" "-z" "relro" "-o" 
"tprog" "-dynamic-linker=/lib/ld-musl-hexagon.so.1" "/usr/lib/crt1.o" 
"-L/usr/lib" "tprog.o" "-lclang_rt.builtins-hexagon" "-lc"

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

Added: 


Modified: 
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/test/Driver/hexagon-toolchain-linux.c

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 7acc600a6aa4fe..dab7382532520a 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -383,7 +383,6 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
   if (HTC.ShouldLinkCXXStdlib(Args))
 HTC.AddCXXStdlibLibArgs(Args, CmdArgs);
 }
-return;
   }
 
   
//
@@ -441,6 +440,7 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
   const ToolChain::path_list  = HTC.getFilePaths();
   for (const auto  : LibPaths)
 CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
+  Args.ClaimAllArgs(options::OPT_L);
 
   
//
   //

diff  --git a/clang/test/Driver/hexagon-toolchain-linux.c 
b/clang/test/Driver/hexagon-toolchain-linux.c
index 05ae1733992d97..61a5581b009c23 100644
--- a/clang/test/Driver/hexagon-toolchain-linux.c
+++ b/clang/test/Driver/hexagon-toolchain-linux.c
@@ -119,3 +119,9 @@
 // CHECK009:   "-resource-dir" "[[RESOURCE:[^"]+]]"
 // CHECK009-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]/include"
 // CHECK009-SAME: {{^}} "-internal-externc-isystem" 
"[[INSTALLED_DIR]]/../target/hexagon/include"
+
+// RUN: %clang -fdriver-only -Werror -v -L/tmp \
+// RUN:--target=hexagon-unknown-linux-musl %s 2>&1 \
+// RUN:| FileCheck -check-prefix=CHECK010 %s
+// CHECK010:   InstalledDir: [[INSTALLED_DIR:.+]]
+// CHECK010:   "-L/tmp"



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cd97675 - [hexagon] add a -mcabac flag

2023-01-31 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2023-01-31T16:30:35-08:00
New Revision: cd97675e02368f31d56bd8f143c5987649d162d8

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

LOG: [hexagon] add a -mcabac flag

For v73 and later, clang users who wish to use the cabac instructions need
a way to add the 'cabac' target feature.

Reviewed By: kparzysz

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

Added: 


Modified: 
clang/include/clang/Driver/Options.td
clang/test/Driver/hexagon-toolchain-elf.c

Removed: 




diff  --git a/clang/include/clang/Driver/Options.td 
b/clang/include/clang/Driver/Options.td
index 9aef70321d525..3dead3fcebb0b 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -4559,6 +4559,8 @@ def mnvs : Flag<["-"], "mnvs">, 
Group,
   Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
 def mno_nvs : Flag<["-"], "mno-nvs">, Group,
   Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
+def mcabac: Flag<["-"], "mcabac">, Group,
+  HelpText<"Enable CABAC instructions">;
 
 // SPARC feature flags
 def mfpu : Flag<["-"], "mfpu">, Group;

diff  --git a/clang/test/Driver/hexagon-toolchain-elf.c 
b/clang/test/Driver/hexagon-toolchain-elf.c
index 477bc8a969b92..9454c33747630 100644
--- a/clang/test/Driver/hexagon-toolchain-elf.c
+++ b/clang/test/Driver/hexagon-toolchain-elf.c
@@ -581,6 +581,16 @@
 // RUN:| FileCheck --check-prefix=CHECK371 %s
 // CHECK371-NOT: "+reserved-r19"
 
+// 
-
+// mcabac
+// 
-
+// RUN: %clang -### -target hexagon-unknown-elf -mcabac %s 2>&1 \
+// RUN:| FileCheck --check-prefix=CHECK372 %s
+// CHECK372: "-target-feature" "+cabac"
+// RUN: %clang -### -target hexagon-unknown-elf %s 2>&1 \
+// RUN:| FileCheck --check-prefix=CHECK373 %s
+// CHECK373-NOT: "+cabac"
+
 // 
-
 // Misc Defaults
 // 
-



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] ab28cb1 - Revert "[xray] add support for hexagon"

2021-12-09 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2021-12-09T07:30:40-08:00
New Revision: ab28cb1c5c4dc7181fae3d47f0601982996739db

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

LOG: Revert "[xray] add support for hexagon"

This reverts commit 543a9ad7c460bb8d641b1b7c67bbc032c9bfdb45.

Added: 


Modified: 
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/lib/Driver/XRayArgs.cpp
compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
compiler-rt/lib/xray/CMakeLists.txt
compiler-rt/lib/xray/xray_interface.cpp
compiler-rt/lib/xray/xray_tsc.h
llvm/lib/CodeGen/XRayInstrumentation.cpp
llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
llvm/lib/Target/Hexagon/HexagonAsmPrinter.h
llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfo.h
llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp
llvm/lib/Target/Hexagon/HexagonSubtarget.h
llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp

Removed: 
compiler-rt/lib/xray/xray_hexagon.cpp
compiler-rt/lib/xray/xray_trampoline_hexagon.S
llvm/test/CodeGen/Hexagon/xray-pred-ret.ll
llvm/test/CodeGen/Hexagon/xray.ll



diff  --git a/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 2ce7904ecc40d..18270818d1589 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -226,7 +226,6 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
   StringRef CpuVer = toolchains::HexagonToolChain::GetTargetCPUVersion(Args);
 
   bool NeedsSanitizerDeps = addSanitizerRuntimes(HTC, Args, CmdArgs);
-  bool NeedsXRayDeps = addXRayRuntime(HTC, Args, CmdArgs);
 
   
//
   // Silence warnings for various options
@@ -298,8 +297,6 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
 
 CmdArgs.push_back("-lunwind");
   }
-  if (NeedsXRayDeps)
-linkXRayRuntimeDeps(HTC, CmdArgs);
 
   CmdArgs.push_back("-lclang_rt.builtins-hexagon");
   CmdArgs.push_back("-lc");

diff  --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp
index 63b575178bd12..b44509ad3b881 100644
--- a/clang/lib/Driver/XRayArgs.cpp
+++ b/clang/lib/Driver/XRayArgs.cpp
@@ -40,7 +40,6 @@ XRayArgs::XRayArgs(const ToolChain , const ArgList ) {
 case llvm::Triple::x86_64:
 case llvm::Triple::arm:
 case llvm::Triple::aarch64:
-case llvm::Triple::hexagon:
 case llvm::Triple::ppc64le:
 case llvm::Triple::mips:
 case llvm::Triple::mipsel:

diff  --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake 
b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index 3e86cf63c789b..45226b4158d74 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -73,8 +73,7 @@ set(ALL_SCUDO_STANDALONE_SUPPORTED_ARCH ${X86} ${X86_64} 
${ARM32} ${ARM64}
 if(APPLE)
 set(ALL_XRAY_SUPPORTED_ARCH ${X86_64})
 else()
-set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}
-   powerpc64le ${HEXAGON})
+set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} 
powerpc64le)
 endif()
 set(ALL_SHADOWCALLSTACK_SUPPORTED_ARCH ${ARM64})
 

diff  --git a/compiler-rt/lib/xray/CMakeLists.txt 
b/compiler-rt/lib/xray/CMakeLists.txt
index ca9389747a5ee..204e5b17c7970 100644
--- a/compiler-rt/lib/xray/CMakeLists.txt
+++ b/compiler-rt/lib/xray/CMakeLists.txt
@@ -73,11 +73,6 @@ set(powerpc64le_SOURCES
   xray_trampoline_powerpc64_asm.S
   )
 
-set(hexagon_SOURCES
-  xray_hexagon.cpp
-  xray_trampoline_hexagon.S
-  )
-
 set(XRAY_IMPL_HEADERS
   xray_allocator.h
   xray_basic_flags.h
@@ -116,7 +111,6 @@ set(XRAY_ALL_SOURCE_FILES
   ${x86_64_SOURCES}
   ${arm_SOURCES}
   ${armhf_SOURCES}
-  ${hexagon_SOURCES}
   ${mips_SOURCES}
   ${mipsel_SOURCES}
   ${mips64_SOURCES}

diff  --git a/compiler-rt/lib/xray/xray_hexagon.cpp 
b/compiler-rt/lib/xray/xray_hexagon.cpp
deleted file mode 100644
index 7f127b2b499cd..0
--- a/compiler-rt/lib/xray/xray_hexagon.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-//===-- xray_hexagon.cpp --*- C++ 
---*-===//
-//
-// 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
-//
-//===--===//
-//
-// This file is a part of XRay, a dynamic runtime instrumentation system.
-//
-// Implementation of hexagon-specific routines (32-bit).
-//
-//===--===//
-#include "sanitizer_common/sanitizer_common.h"

[clang] 543a9ad - [xray] add support for hexagon

2021-12-09 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2021-12-09T05:47:53-08:00
New Revision: 543a9ad7c460bb8d641b1b7c67bbc032c9bfdb45

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

LOG: [xray] add support for hexagon

Adds x-ray support for hexagon to llvm codegen, clang driver,
compiler-rt libs.

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

Added: 
compiler-rt/lib/xray/xray_hexagon.cpp
compiler-rt/lib/xray/xray_trampoline_hexagon.S
llvm/test/CodeGen/Hexagon/xray-pred-ret.ll
llvm/test/CodeGen/Hexagon/xray.ll

Modified: 
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/lib/Driver/XRayArgs.cpp
compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
compiler-rt/lib/xray/CMakeLists.txt
compiler-rt/lib/xray/xray_interface.cpp
compiler-rt/lib/xray/xray_tsc.h
llvm/lib/CodeGen/XRayInstrumentation.cpp
llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
llvm/lib/Target/Hexagon/HexagonAsmPrinter.h
llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfo.h
llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp
llvm/lib/Target/Hexagon/HexagonSubtarget.h
llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 18270818d1589..2ce7904ecc40d 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -226,6 +226,7 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
   StringRef CpuVer = toolchains::HexagonToolChain::GetTargetCPUVersion(Args);
 
   bool NeedsSanitizerDeps = addSanitizerRuntimes(HTC, Args, CmdArgs);
+  bool NeedsXRayDeps = addXRayRuntime(HTC, Args, CmdArgs);
 
   
//
   // Silence warnings for various options
@@ -297,6 +298,8 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
 
 CmdArgs.push_back("-lunwind");
   }
+  if (NeedsXRayDeps)
+linkXRayRuntimeDeps(HTC, CmdArgs);
 
   CmdArgs.push_back("-lclang_rt.builtins-hexagon");
   CmdArgs.push_back("-lc");

diff  --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp
index b44509ad3b881..63b575178bd12 100644
--- a/clang/lib/Driver/XRayArgs.cpp
+++ b/clang/lib/Driver/XRayArgs.cpp
@@ -40,6 +40,7 @@ XRayArgs::XRayArgs(const ToolChain , const ArgList ) {
 case llvm::Triple::x86_64:
 case llvm::Triple::arm:
 case llvm::Triple::aarch64:
+case llvm::Triple::hexagon:
 case llvm::Triple::ppc64le:
 case llvm::Triple::mips:
 case llvm::Triple::mipsel:

diff  --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake 
b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index 45226b4158d74..3e86cf63c789b 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -73,7 +73,8 @@ set(ALL_SCUDO_STANDALONE_SUPPORTED_ARCH ${X86} ${X86_64} 
${ARM32} ${ARM64}
 if(APPLE)
 set(ALL_XRAY_SUPPORTED_ARCH ${X86_64})
 else()
-set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} 
powerpc64le)
+set(ALL_XRAY_SUPPORTED_ARCH ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64}
+   powerpc64le ${HEXAGON})
 endif()
 set(ALL_SHADOWCALLSTACK_SUPPORTED_ARCH ${ARM64})
 

diff  --git a/compiler-rt/lib/xray/CMakeLists.txt 
b/compiler-rt/lib/xray/CMakeLists.txt
index 204e5b17c7970..ca9389747a5ee 100644
--- a/compiler-rt/lib/xray/CMakeLists.txt
+++ b/compiler-rt/lib/xray/CMakeLists.txt
@@ -73,6 +73,11 @@ set(powerpc64le_SOURCES
   xray_trampoline_powerpc64_asm.S
   )
 
+set(hexagon_SOURCES
+  xray_hexagon.cpp
+  xray_trampoline_hexagon.S
+  )
+
 set(XRAY_IMPL_HEADERS
   xray_allocator.h
   xray_basic_flags.h
@@ -111,6 +116,7 @@ set(XRAY_ALL_SOURCE_FILES
   ${x86_64_SOURCES}
   ${arm_SOURCES}
   ${armhf_SOURCES}
+  ${hexagon_SOURCES}
   ${mips_SOURCES}
   ${mipsel_SOURCES}
   ${mips64_SOURCES}

diff  --git a/compiler-rt/lib/xray/xray_hexagon.cpp 
b/compiler-rt/lib/xray/xray_hexagon.cpp
new file mode 100644
index 0..7f127b2b499cd
--- /dev/null
+++ b/compiler-rt/lib/xray/xray_hexagon.cpp
@@ -0,0 +1,168 @@
+//===-- xray_hexagon.cpp --*- C++ 
---*-===//
+//
+// 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
+//
+//===--===//
+//
+// This file is a part of XRay, a dynamic runtime instrumentation system.
+//
+// Implementation of hexagon-specific routines (32-bit).
+//

Re: [llvm-dev] Phabricator Creator Pulling the Plug

2021-10-01 Thread Brian Cain via cfe-commits
On Thu, Sep 30, 2021, 6:04 PM Brian Cain  wrote:

> Does something like Rust's "bors" bot satisfy the herald rules need?
>


sorry, maybe I was thinking of the high-five bot. And it looks like that's
not quite a match for herald.



> re: #2 I have done this on GHE and it's mildly awkward but it does work.
>
> And yes normalizing force pushes is the unfortunate state of GitHub PRs.
> Comments are preserved. Code-anchored comments like review comments are
> marked as referring to out-of-date code, IIRC.
>
> On Thu, Sep 30, 2021, 5:56 PM Mehdi AMINI  wrote:
>
>> We talked about this with the IWG (Infrastructure Working Group) just
>> last week coincidentally.
>> Two major blocking tracks that were identified at the roundtable
>> during the LLVM Dev Meeting exactly 2 years ago are still an issue
>> today:
>>
>> 1) Replacement for Herald rules. This is what allows us to subscribe
>> and track new revisions or commits based on paths in the repo or other
>> criteria. We could build a replacement based on GitHub action or any
>> other kind of service, but this is a bit tricky (how do you store
>> emails privately? etc.). I have looked around online but I didn't find
>> another OSS project (or external company) providing a similar service
>> for GitHub unfortunately, does anyone know of any?
>>
>> 2) Support for stacked commits. I can see how to structure this
>> somehow assuming we would push pull-request branches in the main repo
>> (with one new commit per branch and cascading the pull-requests from
>> one branch to the other), otherwise this will be a major regression
>> compared to the current workflow.
>>
>> What remains unknown to me is the current state of GitHub management
>> of comments across `git commit --amend` and force push to update a
>> branch.
>>
>> Others may have other items to add!
>>
>> --
>> Mehdi
>>
>> On Thu, Sep 30, 2021 at 3:39 PM Brian Cain via llvm-dev
>>  wrote:
>> >
>> > How far are we from a workflow that leverages Github's Pull Requests?
>> Is there some consensus that it's a desired end goal, but some features are
>> missing?  Or do we prefer to use a workflow like this for the long term?
>> >
>> > On Thu, Sep 30, 2021, 4:54 PM Chris Tetreault via llvm-dev <
>> llvm-...@lists.llvm.org> wrote:
>> >>
>> >> As I, and others have noticed, it seems that as of today, there’s some
>> certificate issue with arcanist. (See:
>> https://lists.llvm.org/pipermail/llvm-dev/2021-September/153019.html)
>> The fix seems simple, and a PR is up, but looking through the PR activity,
>> it seems that the PR will not be accepted because Phabricator is no longer
>> being maintained. It seems that arc has become the first casualty of the
>> discontinuation of maintenance of phabricator.
>> >>
>> >>
>> >>
>> >> I know that arc is not universally used, but I think it’s a serious
>> blow to many people’s workflows. I think that MyDeveloperDay’s question
>> might have just become a bit more urgent.
>> >>
>> >>
>> >>
>> >> I suppose in the short-term, we could fork the phabricator repos in
>> order to fix little issues like this. Alternately, we should probably stop
>> recommending arcanist (unless we want to provide instructions on how to fix
>> any breakages that come along).
>> >>
>> >>
>> >>
>> >> Thanks,
>> >>
>> >>Chris Tetreault
>> >>
>> >>
>> >>
>> >> From: llvm-dev  On Behalf Of
>> MyDeveloper Day via llvm-dev
>> >> Sent: Wednesday, August 18, 2021 10:17 AM
>> >> To: llvm-dev ; cfe-commits <
>> cfe-commits@lists.llvm.org>
>> >> Subject: [llvm-dev] Phabricator Creator Pulling the Plug
>> >>
>> >>
>> >>
>> >> WARNING: This email originated from outside of Qualcomm. Please be
>> wary of any links or attachments, and do not enable macros.
>> >>
>> >> All
>> >>
>> >>
>> >>
>> >> I'm a massive fan of Phabricator, and I know there is often lots of
>> contentious discussion about its relative merits vs github,
>> >>
>> >>
>> >>
>> >> But unless I missed this, was there any discussion regarding the
>> recent "Winding Down" announcement of Phabricator? and what it might mean
>> for us in LLVM
>> >>
>> >>
>> >>
>> >> See:
>> >>
>> >>
>> https://admin.phacility.com/phame/post/view/11/phacility_is_winding_down_operations/
>> >>
>> >> https://www.phacility.com/phabricator/
>> >>
>> >>
>> >>
>> >> Personally I'm excited by the concept of a community driven
>> replacement ( https://we.phorge.it/) .
>> >>
>> >> epriestley did a truly amazing job, it wasn't open to public
>> contributions. Perhaps more open development could lead to closing some of
>> the github gaps that were of concern.
>> >>
>> >>
>> >>
>> >> MyDeveloperDay
>> >>
>> >> ___
>> >> LLVM Developers mailing list
>> >> llvm-...@lists.llvm.org
>> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>> >
>> > ___
>> > LLVM Developers mailing list
>> > llvm-...@lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>

Re: [llvm-dev] Phabricator Creator Pulling the Plug

2021-10-01 Thread Brian Cain via cfe-commits
Does something like Rust's "bors" bot satisfy the herald rules need?

re: #2 I have done this on GHE and it's mildly awkward but it does work.

And yes normalizing force pushes is the unfortunate state of GitHub PRs.
Comments are preserved. Code-anchored comments like review comments are
marked as referring to out-of-date code, IIRC.

On Thu, Sep 30, 2021, 5:56 PM Mehdi AMINI  wrote:

> We talked about this with the IWG (Infrastructure Working Group) just
> last week coincidentally.
> Two major blocking tracks that were identified at the roundtable
> during the LLVM Dev Meeting exactly 2 years ago are still an issue
> today:
>
> 1) Replacement for Herald rules. This is what allows us to subscribe
> and track new revisions or commits based on paths in the repo or other
> criteria. We could build a replacement based on GitHub action or any
> other kind of service, but this is a bit tricky (how do you store
> emails privately? etc.). I have looked around online but I didn't find
> another OSS project (or external company) providing a similar service
> for GitHub unfortunately, does anyone know of any?
>
> 2) Support for stacked commits. I can see how to structure this
> somehow assuming we would push pull-request branches in the main repo
> (with one new commit per branch and cascading the pull-requests from
> one branch to the other), otherwise this will be a major regression
> compared to the current workflow.
>
> What remains unknown to me is the current state of GitHub management
> of comments across `git commit --amend` and force push to update a
> branch.
>
> Others may have other items to add!
>
> --
> Mehdi
>
> On Thu, Sep 30, 2021 at 3:39 PM Brian Cain via llvm-dev
>  wrote:
> >
> > How far are we from a workflow that leverages Github's Pull Requests?
> Is there some consensus that it's a desired end goal, but some features are
> missing?  Or do we prefer to use a workflow like this for the long term?
> >
> > On Thu, Sep 30, 2021, 4:54 PM Chris Tetreault via llvm-dev <
> llvm-...@lists.llvm.org> wrote:
> >>
> >> As I, and others have noticed, it seems that as of today, there’s some
> certificate issue with arcanist. (See:
> https://lists.llvm.org/pipermail/llvm-dev/2021-September/153019.html) The
> fix seems simple, and a PR is up, but looking through the PR activity, it
> seems that the PR will not be accepted because Phabricator is no longer
> being maintained. It seems that arc has become the first casualty of the
> discontinuation of maintenance of phabricator.
> >>
> >>
> >>
> >> I know that arc is not universally used, but I think it’s a serious
> blow to many people’s workflows. I think that MyDeveloperDay’s question
> might have just become a bit more urgent.
> >>
> >>
> >>
> >> I suppose in the short-term, we could fork the phabricator repos in
> order to fix little issues like this. Alternately, we should probably stop
> recommending arcanist (unless we want to provide instructions on how to fix
> any breakages that come along).
> >>
> >>
> >>
> >> Thanks,
> >>
> >>Chris Tetreault
> >>
> >>
> >>
> >> From: llvm-dev  On Behalf Of
> MyDeveloper Day via llvm-dev
> >> Sent: Wednesday, August 18, 2021 10:17 AM
> >> To: llvm-dev ; cfe-commits <
> cfe-commits@lists.llvm.org>
> >> Subject: [llvm-dev] Phabricator Creator Pulling the Plug
> >>
> >>
> >>
> >> WARNING: This email originated from outside of Qualcomm. Please be wary
> of any links or attachments, and do not enable macros.
> >>
> >> All
> >>
> >>
> >>
> >> I'm a massive fan of Phabricator, and I know there is often lots of
> contentious discussion about its relative merits vs github,
> >>
> >>
> >>
> >> But unless I missed this, was there any discussion regarding the recent
> "Winding Down" announcement of Phabricator? and what it might mean for us
> in LLVM
> >>
> >>
> >>
> >> See:
> >>
> >>
> https://admin.phacility.com/phame/post/view/11/phacility_is_winding_down_operations/
> >>
> >> https://www.phacility.com/phabricator/
> >>
> >>
> >>
> >> Personally I'm excited by the concept of a community driven replacement
> ( https://we.phorge.it/) .
> >>
> >> epriestley did a truly amazing job, it wasn't open to public
> contributions. Perhaps more open development could lead to closing some of
> the github gaps that were of concern.
> >>
> >>
> >>
> >> MyDeveloperDay
> >>
> >> ___
> >> LLVM Developers mailing list
> >> llvm-...@lists.llvm.org
> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >
> > ___
> > LLVM Developers mailing list
> > llvm-...@lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [llvm-dev] Phabricator Creator Pulling the Plug

2021-10-01 Thread Brian Cain via cfe-commits
How far are we from a workflow that leverages Github's Pull Requests?  Is
there some consensus that it's a desired end goal, but some features are
missing?  Or do we prefer to use a workflow like this for the long term?

On Thu, Sep 30, 2021, 4:54 PM Chris Tetreault via llvm-dev <
llvm-...@lists.llvm.org> wrote:

> As I, and others have noticed, it seems that as of today, there’s some
> certificate issue with arcanist. (See:
> https://lists.llvm.org/pipermail/llvm-dev/2021-September/153019.html) The
> fix seems simple, and a PR is up, but looking through the PR activity, it
> seems that the PR will not be accepted because Phabricator is no longer
> being maintained. It seems that arc has become the first casualty of the
> discontinuation of maintenance of phabricator.
>
>
>
> I know that arc is not universally used, but I think it’s a serious blow
> to many people’s workflows. I think that MyDeveloperDay’s question might
> have just become a bit more urgent.
>
>
>
> I suppose in the short-term, we could fork the phabricator repos in order
> to fix little issues like this. Alternately, we should probably stop
> recommending arcanist (unless we want to provide instructions on how to fix
> any breakages that come along).
>
>
>
> Thanks,
>
>Chris Tetreault
>
>
>
> *From:* llvm-dev  *On Behalf Of *MyDeveloper
> Day via llvm-dev
> *Sent:* Wednesday, August 18, 2021 10:17 AM
> *To:* llvm-dev ; cfe-commits <
> cfe-commits@lists.llvm.org>
> *Subject:* [llvm-dev] Phabricator Creator Pulling the Plug
>
>
>
> *WARNING:* This email originated from outside of Qualcomm. Please be wary
> of any links or attachments, and do not enable macros.
>
> All
>
>
>
> I'm a massive fan of Phabricator, and I know there is often lots of
> contentious discussion about its relative merits vs github,
>
>
>
> But unless I missed this, was there any discussion regarding the recent
> "Winding Down" announcement of Phabricator? and what it might mean for us
> in LLVM
>
>
>
> See:
>
>
> https://admin.phacility.com/phame/post/view/11/phacility_is_winding_down_operations/
>
> https://www.phacility.com/phabricator/
>
>
>
> Personally I'm excited by the concept of a community driven replacement (
> https://we.phorge.it/) .
>
> epriestley did a truly amazing job, it wasn't open to public
> contributions. Perhaps more open development could lead to closing some of
> the github gaps that were of concern.
>
>
>
> MyDeveloperDay
> ___
> LLVM Developers mailing list
> llvm-...@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 59dfde7 - [clang] enable sanitizers for hexagon

2021-08-17 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2021-08-17T19:59:24-07:00
New Revision: 59dfde7d9460242e75d4fe9b62d77ea0f1e8d7dc

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

LOG: [clang] enable sanitizers for hexagon

Added: 


Modified: 
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/lib/Driver/ToolChains/Hexagon.h
clang/lib/Driver/ToolChains/Linux.cpp

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 314d0efce4414..5f5964ec982b6 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -146,6 +146,8 @@ void hexagon::Assembler::ConstructJob(Compilation , const 
JobAction ,
   "-mcpu=hexagon" +
   toolchains::HexagonToolChain::GetTargetCPUVersion(Args)));
 
+  addSanitizerRuntimes(HTC, Args, CmdArgs);
+
   if (Output.isFilename()) {
 CmdArgs.push_back("-o");
 CmdArgs.push_back(Output.getFilename());
@@ -223,6 +225,8 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
   bool UseShared = IsShared && !IsStatic;
   StringRef CpuVer = toolchains::HexagonToolChain::GetTargetCPUVersion(Args);
 
+  bool NeedsSanitizerDeps = addSanitizerRuntimes(HTC, Args, CmdArgs);
+
   
//
   // Silence warnings for various options
   
//
@@ -288,6 +292,12 @@ constructHexagonLinkArgs(Compilation , const JobAction 
,
 AddLinkerInputs(HTC, Inputs, Args, CmdArgs, JA);
 
 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
+  if (NeedsSanitizerDeps) {
+linkSanitizerRuntimeDeps(HTC, CmdArgs);
+
+CmdArgs.push_back("-lunwind");
+  }
+
   CmdArgs.push_back("-lclang_rt.builtins-hexagon");
   CmdArgs.push_back("-lc");
 }
@@ -450,6 +460,13 @@ Optional HexagonToolChain::getSmallDataThreshold(
   return None;
 }
 
+std::string HexagonToolChain::getCompilerRTPath() const {
+  SmallString<128> Dir(getDriver().SysRoot);
+  llvm::sys::path::append(Dir, "usr", "lib");
+  Dir += SelectedMultilib.gccSuffix();
+  return std::string(Dir.str());
+}
+
 void HexagonToolChain::getHexagonLibraryPaths(const ArgList ,
   ToolChain::path_list ) const {
   const Driver  = getDriver();

diff  --git a/clang/lib/Driver/ToolChains/Hexagon.h 
b/clang/lib/Driver/ToolChains/Hexagon.h
index c32cb7f09591a..9dc9b3ceddde1 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.h
+++ b/clang/lib/Driver/ToolChains/Hexagon.h
@@ -104,6 +104,8 @@ class LLVM_LIBRARY_VISIBILITY HexagonToolChain : public 
Linux {
   void getHexagonLibraryPaths(const llvm::opt::ArgList ,
   ToolChain::path_list ) const;
 
+  std::string getCompilerRTPath() const override;
+
   static bool isAutoHVXEnabled(const llvm::opt::ArgList );
   static const StringRef GetDefaultCPU();
   static const StringRef GetTargetCPUVersion(const llvm::opt::ArgList );

diff  --git a/clang/lib/Driver/ToolChains/Linux.cpp 
b/clang/lib/Driver/ToolChains/Linux.cpp
index c9360fc67165b..caebab3a9aeb0 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -694,6 +694,7 @@ SanitizerMask Linux::getSupportedSanitizers() const {
  getTriple().getArch() == llvm::Triple::thumbeb;
   const bool IsRISCV64 = getTriple().getArch() == llvm::Triple::riscv64;
   const bool IsSystemZ = getTriple().getArch() == llvm::Triple::systemz;
+  const bool IsHexagon = getTriple().getArch() == llvm::Triple::hexagon;
   SanitizerMask Res = ToolChain::getSupportedSanitizers();
   Res |= SanitizerKind::Address;
   Res |= SanitizerKind::PointerCompare;
@@ -707,7 +708,7 @@ SanitizerMask Linux::getSupportedSanitizers() const {
   if (IsX86_64 || IsMIPS64 || IsAArch64)
 Res |= SanitizerKind::DataFlow;
   if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsArmArch || IsPowerPC64 ||
-  IsRISCV64 || IsSystemZ)
+  IsRISCV64 || IsSystemZ || IsHexagon)
 Res |= SanitizerKind::Leak;
   if (IsX86_64 || IsMIPS64 || IsAArch64 || IsPowerPC64 || IsSystemZ)
 Res |= SanitizerKind::Thread;
@@ -716,7 +717,7 @@ SanitizerMask Linux::getSupportedSanitizers() const {
   if (IsX86 || IsX86_64)
 Res |= SanitizerKind::Function;
   if (IsX86_64 || IsMIPS64 || IsAArch64 || IsX86 || IsMIPS || IsArmArch ||
-  IsPowerPC64)
+  IsPowerPC64 || IsHexagon)
 Res |= SanitizerKind::Scudo;
   if (IsX86_64 || IsAArch64) {
 Res |= SanitizerKind::HWAddress;



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 888876b - [clang] [hexagon] Add resource include dir

2021-08-10 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2021-08-10T08:37:58-05:00
New Revision: 76ba272baf68ff38fcfc36c15ac2510bdea7

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

LOG: [clang] [hexagon] Add resource include dir

Added: 


Modified: 
clang/lib/Driver/ToolChains/Hexagon.cpp
clang/test/Driver/hexagon-toolchain-linux.c

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Hexagon.cpp 
b/clang/lib/Driver/ToolChains/Hexagon.cpp
index 828bfdbb05a3c..314d0efce4414 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.cpp
+++ b/clang/lib/Driver/ToolChains/Hexagon.cpp
@@ -588,21 +588,43 @@ void HexagonToolChain::addClangTargetOptions(const 
ArgList ,
 
 void HexagonToolChain::AddClangSystemIncludeArgs(const ArgList ,
  ArgStringList ) const 
{
-  if (DriverArgs.hasArg(options::OPT_nostdinc) ||
-  DriverArgs.hasArg(options::OPT_nostdlibinc))
+  if (DriverArgs.hasArg(options::OPT_nostdinc))
 return;
 
+  const bool IsELF = !getTriple().isMusl() && !getTriple().isOSLinux();
+  const bool IsLinuxMusl = getTriple().isMusl() && getTriple().isOSLinux();
+
   const Driver  = getDriver();
-  if (!D.SysRoot.empty()) {
+  SmallString<128> ResourceDirInclude(D.ResourceDir);
+  if (!IsELF) {
+llvm::sys::path::append(ResourceDirInclude, "include");
+if (!DriverArgs.hasArg(options::OPT_nobuiltininc) &&
+(!IsLinuxMusl || DriverArgs.hasArg(options::OPT_nostdlibinc)))
+  addSystemInclude(DriverArgs, CC1Args, ResourceDirInclude);
+  }
+  if (DriverArgs.hasArg(options::OPT_nostdlibinc))
+return;
+
+  const bool HasSysRoot = !D.SysRoot.empty();
+  if (HasSysRoot) {
 SmallString<128> P(D.SysRoot);
-if (getTriple().isMusl())
+if (IsLinuxMusl)
   llvm::sys::path::append(P, "usr/include");
 else
   llvm::sys::path::append(P, "include");
+
 addExternCSystemInclude(DriverArgs, CC1Args, P.str());
-return;
+// LOCAL_INCLUDE_DIR
+addSystemInclude(DriverArgs, CC1Args, P + "/usr/local/include");
+// TOOL_INCLUDE_DIR
+AddMultilibIncludeArgs(DriverArgs, CC1Args);
   }
 
+  if (!DriverArgs.hasArg(options::OPT_nobuiltininc) && IsLinuxMusl)
+addSystemInclude(DriverArgs, CC1Args, ResourceDirInclude);
+
+  if (HasSysRoot)
+return;
   std::string TargetDir = getHexagonTargetDir(D.getInstalledDir(),
   D.PrefixDirs);
   addExternCSystemInclude(DriverArgs, CC1Args, TargetDir + "/hexagon/include");

diff  --git a/clang/test/Driver/hexagon-toolchain-linux.c 
b/clang/test/Driver/hexagon-toolchain-linux.c
index 354a924f12098..da59590371b90 100644
--- a/clang/test/Driver/hexagon-toolchain-linux.c
+++ b/clang/test/Driver/hexagon-toolchain-linux.c
@@ -1,3 +1,5 @@
+// UNSUPPORTED: system-windows
+
 // 
-
 // Passing --musl
 // 
-
@@ -94,4 +96,26 @@
 // RUN:   -mcpu=hexagonv60 \
 // RUN:   %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK007 %s
-// CHECK007:  "-internal-isystem" 
"{{.*}}hexagon{{/|}}include{{/|}}c++{{/|}}v1"
+// CHECK007:   "-internal-isystem" 
"{{.*}}hexagon{{/|}}include{{/|}}c++{{/|}}v1"
+// 
-
+// internal-isystem for linux with and without musl
+// 
-
+// RUN: %clang -### -target hexagon-unknown-linux-musl \
+// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK008 %s
+// CHECK008:   InstalledDir: [[INSTALLED_DIR:.+]]
+// CHECK008:   "-resource-dir" "[[RESOURCE:[^"]+]]"
+// CHECK008-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]/include"
+// CHECK008-SAME: {{^}} "-internal-externc-isystem" 
"[[INSTALLED_DIR]]/../target/hexagon/include"
+
+// RUN: %clang -### -target hexagon-unknown-linux \
+// RUN:   -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
+// RUN:   -resource-dir=%S/Inputs/resource_dir \
+// RUN:   %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=CHECK009 %s
+// CHECK009:   InstalledDir: [[INSTALLED_DIR:.+]]
+// CHECK009:   "-resource-dir" "[[RESOURCE:[^"]+]]"
+// CHECK009-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]/include"
+// CHECK009-SAME: {{^}} "-internal-externc-isystem" 
"[[INSTALLED_DIR]]/../target/hexagon/include"



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] 9107594 - [libunwind] add hexagon support

2020-04-10 Thread Brian Cain via cfe-commits

Author: Brian Cain
Date: 2020-04-10T04:24:10-05:00
New Revision: 9107594f376e37e99c71881404c686b306f93ad2

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

LOG: [libunwind] add hexagon support

Added: 


Modified: 
libunwind/include/__libunwind_config.h
libunwind/include/libunwind.h
libunwind/src/Registers.hpp
libunwind/src/UnwindCursor.hpp
libunwind/src/UnwindRegistersRestore.S
libunwind/src/UnwindRegistersSave.S
libunwind/src/assembly.h
libunwind/src/config.h
libunwind/src/libunwind.cpp

Removed: 




diff  --git a/libunwind/include/__libunwind_config.h 
b/libunwind/include/__libunwind_config.h
index 4d03bd83d8c6..71d77ca65118 100644
--- a/libunwind/include/__libunwind_config.h
+++ b/libunwind/include/__libunwind_config.h
@@ -23,6 +23,7 @@
 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K  32
 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS  65
 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 31
+#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON   34
 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 64
 
 #if defined(_LIBUNWIND_IS_NATIVE_ONLY)
@@ -82,6 +83,12 @@
 #  define _LIBUNWIND_CONTEXT_SIZE 16
 #  define _LIBUNWIND_CURSOR_SIZE 24
 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER 
_LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K
+# elif defined(__hexagon__)
+#  define _LIBUNWIND_TARGET_HEXAGON 1
+// Values here change when : Registers.hpp - hexagon_thread_state_t change
+#  define _LIBUNWIND_CONTEXT_SIZE 18
+#  define _LIBUNWIND_CURSOR_SIZE 24
+#  define _LIBUNWIND_HIGHEST_DWARF_REGISTER 
_LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON
 # elif defined(__mips__)
 #  if defined(_ABIO32) && _MIPS_SIM == _ABIO32
 #define _LIBUNWIND_TARGET_MIPS_O32 1
@@ -142,6 +149,7 @@
 # define _LIBUNWIND_TARGET_MIPS_O32 1
 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1
 # define _LIBUNWIND_TARGET_SPARC 1
+# define _LIBUNWIND_TARGET_HEXAGON 1
 # define _LIBUNWIND_TARGET_RISCV 1
 # define _LIBUNWIND_CONTEXT_SIZE 167
 # define _LIBUNWIND_CURSOR_SIZE 179

diff  --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h
index 1a501b867dda..23ef47f4ac83 100644
--- a/libunwind/include/libunwind.h
+++ b/libunwind/include/libunwind.h
@@ -832,6 +832,44 @@ enum {
   UNW_SPARC_I7 = 31,
 };
 
+// Hexagon register numbers
+enum {
+  UNW_HEXAGON_R0,
+  UNW_HEXAGON_R1,
+  UNW_HEXAGON_R2,
+  UNW_HEXAGON_R3,
+  UNW_HEXAGON_R4,
+  UNW_HEXAGON_R5,
+  UNW_HEXAGON_R6,
+  UNW_HEXAGON_R7,
+  UNW_HEXAGON_R8,
+  UNW_HEXAGON_R9,
+  UNW_HEXAGON_R10,
+  UNW_HEXAGON_R11,
+  UNW_HEXAGON_R12,
+  UNW_HEXAGON_R13,
+  UNW_HEXAGON_R14,
+  UNW_HEXAGON_R15,
+  UNW_HEXAGON_R16,
+  UNW_HEXAGON_R17,
+  UNW_HEXAGON_R18,
+  UNW_HEXAGON_R19,
+  UNW_HEXAGON_R20,
+  UNW_HEXAGON_R21,
+  UNW_HEXAGON_R22,
+  UNW_HEXAGON_R23,
+  UNW_HEXAGON_R24,
+  UNW_HEXAGON_R25,
+  UNW_HEXAGON_R26,
+  UNW_HEXAGON_R27,
+  UNW_HEXAGON_R28,
+  UNW_HEXAGON_R29,
+  UNW_HEXAGON_R30,
+  UNW_HEXAGON_R31,
+  UNW_HEXAGON_P3_0,
+  UNW_HEXAGON_PC,
+};
+
 // RISC-V registers. These match the DWARF register numbers defined by section
 // 4 of the RISC-V ELF psABI specification, which can be found at:
 //

diff  --git a/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp
index ffc75eee6bf8..26a0fa8f338e 100644
--- a/libunwind/src/Registers.hpp
+++ b/libunwind/src/Registers.hpp
@@ -34,6 +34,7 @@ enum {
   REGISTERS_MIPS_O32,
   REGISTERS_MIPS_NEWABI,
   REGISTERS_SPARC,
+  REGISTERS_HEXAGON,
   REGISTERS_RISCV,
 };
 
@@ -3528,6 +3529,187 @@ inline const char *Registers_sparc::getRegisterName(int 
regNum) {
 }
 #endif // _LIBUNWIND_TARGET_SPARC
 
+#if defined(_LIBUNWIND_TARGET_HEXAGON)
+/// Registers_hexagon holds the register state of a thread in a Hexagon QDSP6
+/// process.
+class _LIBUNWIND_HIDDEN Registers_hexagon {
+public:
+  Registers_hexagon();
+  Registers_hexagon(const void *registers);
+
+  boolvalidRegister(int num) const;
+  uint32_tgetRegister(int num) const;
+  voidsetRegister(int num, uint32_t value);
+  boolvalidFloatRegister(int num) const;
+  double  getFloatRegister(int num) const;
+  voidsetFloatRegister(int num, double value);
+  boolvalidVectorRegister(int num) const;
+  v128getVectorRegister(int num) const;
+  voidsetVectorRegister(int num, v128 value);
+  const char *getRegisterName(int num);
+  voidjumpto();
+  static int  lastDwarfRegNum() { return 
_LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON; }
+  static int  getArch() { return REGISTERS_HEXAGON; }
+
+  uint32_t  getSP() const { return _registers.__r[UNW_HEXAGON_R29]; }
+  void  setSP(uint32_t value) { _registers.__r[UNW_HEXAGON_R29] = value; }
+  uint32_t  getIP() const { return _registers.__r[UNW_HEXAGON_PC]; }
+  void  setIP(uint32_t value) { 

r368334 - [clang] add REQUIRES: linux to driver test case

2019-08-08 Thread Brian Cain via cfe-commits
Author: bcain
Date: Thu Aug  8 13:12:54 2019
New Revision: 368334

URL: http://llvm.org/viewvc/llvm-project?rev=368334=rev
Log:
[clang] add REQUIRES: linux to driver test case

The test case explicitly leverages linux, so should include it as
a test requirement.

Modified:
cfe/trunk/test/Driver/as-no-warnings.c

Modified: cfe/trunk/test/Driver/as-no-warnings.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/as-no-warnings.c?rev=368334=368333=368334=diff
==
--- cfe/trunk/test/Driver/as-no-warnings.c (original)
+++ cfe/trunk/test/Driver/as-no-warnings.c Thu Aug  8 13:12:54 2019
@@ -7,6 +7,7 @@
 
 // REQUIRES: clang-driver
 // REQUIRES: x86-registered-target
+// REQUIRES: linux
 
 // CHECK: "-cc1" {{.*}} "-massembler-no-warn"
 // CHECK-NOIAS: "--no-warn"


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r368332 - [clang] add REQUIRES to driver test case

2019-08-08 Thread Brian Cain via cfe-commits
Author: bcain
Date: Thu Aug  8 13:04:39 2019
New Revision: 368332

URL: http://llvm.org/viewvc/llvm-project?rev=368332=rev
Log:
[clang] add REQUIRES to driver test case

The test case explicitly leverages x86, so should include it as
a test requirement.

Modified:
cfe/trunk/test/Driver/as-no-warnings.c

Modified: cfe/trunk/test/Driver/as-no-warnings.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/as-no-warnings.c?rev=368332=368331=368332=diff
==
--- cfe/trunk/test/Driver/as-no-warnings.c (original)
+++ cfe/trunk/test/Driver/as-no-warnings.c Thu Aug  8 13:04:39 2019
@@ -5,6 +5,9 @@
 // RUN: not %clang %s -c -o %t.o -target i686-pc-linux-gnu -integrated-as 
-Wa,--fatal-warnings 2>&1 | FileCheck --check-prefix=CHECK-AS-FATAL %s
 // RUN: not %clang %s -c -o %t.o -target i686-pc-linux-gnu -fno-integrated-as 
-Wa,--fatal-warnings 2>&1 | FileCheck --check-prefix=CHECK-AS-FATAL %s
 
+// REQUIRES: clang-driver
+// REQUIRES: x86-registered-target
+
 // CHECK: "-cc1" {{.*}} "-massembler-no-warn"
 // CHECK-NOIAS: "--no-warn"
 // CHECK-AS-NOWARN-NOT: warning:


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r368328 - [clang] Add no-warn support for Wa

2019-08-08 Thread Brian Cain via cfe-commits
Author: bcain
Date: Thu Aug  8 12:19:20 2019
New Revision: 368328

URL: http://llvm.org/viewvc/llvm-project?rev=368328=rev
Log:
[clang] Add no-warn support for Wa

Added:
cfe/trunk/test/Driver/as-no-warnings.c
Modified:
cfe/trunk/include/clang/Basic/CodeGenOptions.def
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/tools/driver/cc1as_main.cpp

Modified: cfe/trunk/include/clang/Basic/CodeGenOptions.def
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/CodeGenOptions.def?rev=368328=368327=368328=diff
==
--- cfe/trunk/include/clang/Basic/CodeGenOptions.def (original)
+++ cfe/trunk/include/clang/Basic/CodeGenOptions.def Thu Aug  8 12:19:20 2019
@@ -133,6 +133,7 @@ CODEGENOPT(NoDwarfDirectoryAsm , 1, 0) /
 CODEGENOPT(NoExecStack   , 1, 0) ///< Set when -Wa,--noexecstack is 
enabled.
 CODEGENOPT(FatalWarnings , 1, 0) ///< Set when -Wa,--fatal-warnings is
  ///< enabled.
+CODEGENOPT(NoWarn, 1, 0) ///< Set when -Wa,--no-warn is enabled.
 CODEGENOPT(EnableSegmentedStacks , 1, 0) ///< Set when -fsplit-stack is 
enabled.
 CODEGENOPT(NoImplicitFloat   , 1, 0) ///< Set when -mno-implicit-float is 
enabled.
 CODEGENOPT(NoInfsFPMath  , 1, 0) ///< Assume FP arguments, results not 
+-Inf.

Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=368328=368327=368328=diff
==
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Thu Aug  8 12:19:20 2019
@@ -200,6 +200,8 @@ def compress_debug_sections_EQ : Joined<
 HelpText<"DWARF debug sections compression type">;
 def mno_exec_stack : Flag<["-"], "mnoexecstack">,
   HelpText<"Mark the file as not needing an executable stack">;
+def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
+  HelpText<"Make assembler not emit warnings">;
 def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
   HelpText<"Make assembler warnings fatal">;
 def mrelax_relocations : Flag<["--"], "mrelax-relocations">,

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=368328=368327=368328=diff
==
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Aug  8 12:19:20 2019
@@ -493,6 +493,7 @@ static void initTargetOptions(llvm::Targ
   CodeGenOpts.IncrementalLinkerCompatible;
   Options.MCOptions.MCPIECopyRelocations = CodeGenOpts.PIECopyRelocations;
   Options.MCOptions.MCFatalWarnings = CodeGenOpts.FatalWarnings;
+  Options.MCOptions.MCNoWarn = CodeGenOpts.NoWarn;
   Options.MCOptions.AsmVerbose = CodeGenOpts.AsmVerbose;
   Options.MCOptions.PreserveAsmComments = CodeGenOpts.PreserveAsmComments;
   Options.MCOptions.ABIName = TargetOpts.ABI;

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=368328=368327=368328=diff
==
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Thu Aug  8 12:19:20 2019
@@ -2169,6 +2169,8 @@ static void CollectArgsForIntegratedAsse
 CmdArgs.push_back("-msave-temp-labels");
   } else if (Value == "--fatal-warnings") {
 CmdArgs.push_back("-massembler-fatal-warnings");
+  } else if (Value == "--no-warn") {
+CmdArgs.push_back("-massembler-no-warn");
   } else if (Value == "--noexecstack") {
 UseNoExecStack = true;
   } else if (Value.startswith("-compress-debug-sections") ||

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=368328=368327=368328=diff
==
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Aug  8 12:19:20 2019
@@ -888,6 +888,7 @@ static bool ParseCodeGenArgs(CodeGenOpti
   Opts.NumRegisterParameters = getLastArgIntValue(Args, OPT_mregparm, 0, 
Diags);
   Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack);
   Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings);
+  Opts.NoWarn = Args.hasArg(OPT_massembler_no_warn);
   Opts.EnableSegmentedStacks = Args.hasArg(OPT_split_stacks);
   Opts.RelaxAll = Args.hasArg(OPT_mrelax_all);
   Opts.IncrementalLinkerCompatible =

Added: 

r368327 - [llvm-mc] Add reportWarning() to MCContext

2019-08-08 Thread Brian Cain via cfe-commits
Author: bcain
Date: Thu Aug  8 12:13:23 2019
New Revision: 368327

URL: http://llvm.org/viewvc/llvm-project?rev=368327=rev
Log:
[llvm-mc] Add reportWarning() to MCContext

Adding reportWarning() to MCContext, so that it can be used from
the Hexagon assembler backend.

Modified:
cfe/trunk/tools/driver/cc1as_main.cpp

Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=368327=368326=368327=diff
==
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Thu Aug  8 12:13:23 2019
@@ -374,7 +374,8 @@ static bool ExecuteAssembler(AssemblerIn
   // MCObjectFileInfo needs a MCContext reference in order to initialize 
itself.
   std::unique_ptr MOFI(new MCObjectFileInfo());
 
-  MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), );
+  MCTargetOptions MCOptions;
+  MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), , );
 
   bool PIC = false;
   if (Opts.RelocationModel == "static") {
@@ -431,7 +432,6 @@ static bool ExecuteAssembler(AssemblerIn
   raw_pwrite_stream *Out = FDOS.get();
   std::unique_ptr BOS;
 
-  MCTargetOptions MCOptions;
   MCOptions.ABIName = Opts.TargetABI;
 
   // FIXME: There is a bit of code duplication with addPassesToEmitFile.


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r339979 - [hexagon] restore -fuse-cxa-atexit by default

2018-08-16 Thread Brian Cain via cfe-commits
Author: bcain
Date: Thu Aug 16 20:53:51 2018
New Revision: 339979

URL: http://llvm.org/viewvc/llvm-project?rev=339979=rev
Log:
[hexagon] restore -fuse-cxa-atexit by default

"-fno-use-cxa-atexit" was a default provided by the initial
commit offering hexagon support.  This is no longer required.

Reviewers: bcahoon, sidneym

Subscribers: llvm-commits

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


Modified:
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/test/Driver/cxa-atexit.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=339979=339978=339979=diff
==
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Thu Aug 16 20:53:51 2018
@@ -4225,7 +4225,6 @@ void Clang::ConstructJob(Compilation ,
   options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
   !RawTriple.isOSWindows() &&
   RawTriple.getOS() != llvm::Triple::Solaris &&
-  getToolChain().getArch() != llvm::Triple::hexagon &&
   getToolChain().getArch() != llvm::Triple::xcore &&
   ((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||

Modified: cfe/trunk/test/Driver/cxa-atexit.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cxa-atexit.cpp?rev=339979=339978=339979=diff
==
--- cfe/trunk/test/Driver/cxa-atexit.cpp (original)
+++ cfe/trunk/test/Driver/cxa-atexit.cpp Thu Aug 16 20:53:51 2018
@@ -20,7 +20,7 @@
 
 // CHECK-WINDOWS: "-fno-use-cxa-atexit"
 // CHECK-SOLARIS: "-fno-use-cxa-atexit"
-// CHECK-HEXAGON: "-fno-use-cxa-atexit"
+// CHECK-HEXAGON-NOT: "-fno-use-cxa-atexit"
 // CHECK-XCORE: "-fno-use-cxa-atexit"
 // CHECK-MTI: "-fno-use-cxa-atexit"
 // CHECK-MIPS-NOT: "-fno-use-cxa-atexit"


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r312774 - XFAIL tests on SLES11

2017-09-08 Thread Brian Cain via cfe-commits
Author: bcain
Date: Thu Sep  7 20:57:02 2017
New Revision: 312774

URL: http://llvm.org/viewvc/llvm-project?rev=312774=rev
Log:
XFAIL tests on SLES11

XFAIL some failing tests for SLES11 (older glibc), also replace spaces
in linux distro w/dashes.


Modified:
libcxx/trunk/test/std/depr/depr.c.headers/uchar_h.pass.cpp

libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp

libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
libcxx/trunk/utils/libcxx/test/target_info.py

Modified: libcxx/trunk/test/std/depr/depr.c.headers/uchar_h.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/uchar_h.pass.cpp?rev=312774=312773=312774=diff
==
--- libcxx/trunk/test/std/depr/depr.c.headers/uchar_h.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.c.headers/uchar_h.pass.cpp Thu Sep  7 
20:57:02 2017
@@ -7,6 +7,7 @@
 //
 
//===--===//
 //
+// XFAIL: suse-linux-enterprise-server-11
 // XFAIL: apple-darwin
 // XFAIL: newlib
 

Modified: 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp?rev=312774=312773=312774=diff
==
--- 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
 Thu Sep  7 20:57:02 2017
@@ -7,6 +7,7 @@
 //
 
//===--===//
 
+// XFAIL: suse-linux-enterprise-server-11
 // XFAIL: with_system_cxx_lib=macosx10.12
 // XFAIL: with_system_cxx_lib=macosx10.11
 // XFAIL: with_system_cxx_lib=macosx10.10

Modified: 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp?rev=312774=312773=312774=diff
==
--- 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
 Thu Sep  7 20:57:02 2017
@@ -13,6 +13,7 @@
 
 // const error_category& system_category();
 
+// XFAIL: suse-linux-enterprise-server-11
 // XFAIL: with_system_cxx_lib=macosx10.12
 // XFAIL: with_system_cxx_lib=macosx10.11
 // XFAIL: with_system_cxx_lib=macosx10.10

Modified: libcxx/trunk/utils/libcxx/test/target_info.py
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/target_info.py?rev=312774=312773=312774=diff
==
--- libcxx/trunk/utils/libcxx/test/target_info.py (original)
+++ libcxx/trunk/utils/libcxx/test/target_info.py Thu Sep  7 20:57:02 2017
@@ -190,12 +190,14 @@ class LinuxLocalTI(DefaultTargetInfo):
 
 def platform_name(self):
 name, _, _ = platform.linux_distribution()
-name = name.lower().strip()
+# Some distros have spaces, e.g. 'SUSE Linux Enterprise Server'
+# lit features can't have spaces
+name = name.lower().strip().replace(' ', '-')
 return name # Permitted to be None
 
 def platform_ver(self):
 _, ver, _ = platform.linux_distribution()
-ver = ver.lower().strip()
+ver = ver.lower().strip().replace(' ', '-')
 return ver # Permitted to be None.
 
 def add_locale_features(self, features):


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits