Closed WebDrake closed 6 years ago
@kinke this follows your suggestion in an earlier PR: https://github.com/ldc-developers/ldc2.snap/pull/54#discussion_r193894378. Does the solution look good to you?
Simplified the script changes:
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index d4997df..617bc26 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -33,15 +33,13 @@ parts:
source-type: git
plugin: cmake
override-build: |
- LDC_DEFAULT_LIB_SUFFIX="$(getconf LONG_BIT)"
- echo "Default LDC lib suffix: $LDC_DEFAULT_LIB_SUFFIX"
cmake ../src \
-DCMAKE_INSTALL_PREFIX= \
-DD_COMPILER=../../ldc-bootstrap/build/bin/ldmd2 \
-DD_FLAGS='-w;-flto=thin' \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE='-O3 -DNDEBUG -Wa,-mrelax-relocations=no' \
- -DLIB_SUFFIX="$LDC_DEFAULT_LIB_SUFFIX" \
+ -DLIB_SUFFIX="$(getconf LONG_BIT)" \
-DLLVM_ROOT_DIR=../../llvm/install \
-DBUILD_LTO_LIBS=ON \
-DLDC_INSTALL_LTOPLUGIN=ON \
This should ensure that libraries are always placed in either
lib64
orlib32
.ldc2.conf
has been simplified accordingly.