ldc-developers / ldc2.snap

Snap package definition for LDC, the LLVM-based D compiler
11 stars 4 forks source link

Bring LLVM targets up to date with LDC upstream #69

Closed WebDrake closed 5 years ago

WebDrake commented 5 years ago

This patch adds Mips and MSP430 regular LLVM targets together with the RISCV and WebAssembly experimental targets, matching what is done with the upstream LDC binary packages.

The targets have also been alphabetized for easy discovery.

WebDrake commented 5 years ago

Hmm, looks like there is a package discovery problem. I'll push a separate patch to address that.

WebDrake commented 5 years ago

Rebased now that the build problems are addressed. This ought to work now ...

WebDrake commented 5 years ago

Tweaked the syntax a bit to match what was present previously. Let's see if this makes a difference.

diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 9ec1779..2adef06 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -95,8 +95,8 @@ parts:
     - -DCMAKE_BUILD_TYPE=Release
     - -DCOMPILER_RT_INCLUDE_TESTS=OFF
     - -DLLVM_BINUTILS_INCDIR=/usr/include
-    - -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;MSP430;NVPTX;PowerPC;X86"
-    - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="RISCV;WebAssembly"
+    - -DLLVM_TARGETS_TO_BUILD=AArch64\;ARM\;Mips\;MSP430\;NVPTX\;PowerPC\;X86
+    - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV\;WebAssembly
     stage:
     - -*
     prime:
WebDrake commented 5 years ago

OK, I'm a bit mystified by why this is failing this time round:

CMake Error at CMakeLists.txt:686 (message):
  The target `RISCV' is experimental and must be passed via
  LLVM_EXPERIMENTAL_TARGETS_TO_BUILD.

... when I'm passing RISCV by exactly that variable. Anyone have any ideas?

WebDrake commented 5 years ago

One more small syntax tweak ought to fix this (verified locally):

diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 2adef06..195bba6 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -95,8 +95,8 @@ parts:
     - -DCMAKE_BUILD_TYPE=Release
     - -DCOMPILER_RT_INCLUDE_TESTS=OFF
     - -DLLVM_BINUTILS_INCDIR=/usr/include
-    - -DLLVM_TARGETS_TO_BUILD=AArch64\;ARM\;Mips\;MSP430\;NVPTX\;PowerPC\;X86
-    - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV\;WebAssembly
+    - -DLLVM_TARGETS_TO_BUILD=AArch64;ARM;Mips;MSP430;NVPTX;PowerPC;X86
+    - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV;WebAssembly
     stage:
     - -*
     prime: