Context
stack-macos.yaml is a copy of stack.yaml, with one additional llvm-hs flag at the bottom:
| flags: |
| llvm-hs: |
| shared-llvm: false |
The flag seems necessary to prevent this crash during stack build:
$ stack build llvm-hs> configure llvm-hs> [1 of 2] Compiling Main ( /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/Setup.hs, /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/setup/Main.o ) llvm-hs> [2 of 2] Compiling StackSetupShim ( /Users/danielzheng/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/setup/StackSetupShim.o ) llvm-hs> Linking /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/setup/setup ... llvm-hs> setup: '/usr/local/opt/llvm@9/bin/llvm-config' exited with an error: llvm-hs> llvm-config: error: libLLVM-9.dylib is missing llvm-hs> Progress 1/2
Goal
Unifying the two stack.yaml files would be a big win for build simplification and maintainability.
A simple approach would be to add platform-specific configuration to dex.cabal or stack.yaml. HaskTorch friends (@junjihashimoto, @tscholak) shared that Stack does not support platform-specific configuration, but Cabal does appear to support it.
Context
stack-macos.yamlis a copy ofstack.yaml, with one additionalllvm-hsflag at the bottom:dex-lang/stack-macos.yaml
Lines 24 to 26 in 269c26c
The flag seems necessary to prevent this crash during
stack build:Goal
Unifying the two
stack.yamlfiles would be a big win for build simplification and maintainability.A simple approach would be to add platform-specific configuration to
dex.cabalorstack.yaml. HaskTorch friends (@junjihashimoto, @tscholak) shared that Stack does not support platform-specific configuration, but Cabal does appear to support it.