ldc-developers / ldc2.snap

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

Simplify or remove override-build sections #105

Closed WebDrake closed 3 years ago

WebDrake commented 4 years ago

snapcraft now actively supports using the ninja cmake backend, so in general we do not need to override-build to use this. This allows us to go back to regular configflags settings for the ldc-bootstrap and llvm parts, although we have to add source-subdir settings to llvm because its CMakeLists.txt file is not in the source root.

For the ldc part we can move all the cmake config flags and simplify the override-build to just run snapcraftctl build followed by the search-and-replace dmd-testsuite workaround, and the call to ctest.

We also need to make one small tweak to the ldc part configflags: when setting DLIB_SUFFIX, we need to use $$ to escape the $ for ninja, and drop the surrounding quotes in order to ensure the scripted segment is passed to cmake correctly by snapcraft.

WebDrake commented 4 years ago

I'm a bit mystified as to why this PR is continuously failing, as it works fine when building locally. Something to do with Azure Pipelines, perhaps?

WebDrake commented 4 years ago

OK, seems that the failure here is due to how snapcraft treats environment variables created by Azure Pipelines: https://forum.snapcraft.io/t/cmake-plugin-failure-in-azure-pipelines/15825

The drop! patches can therefore be abandoned, and we can return to this PR once snapcraft itself is fixed.

WebDrake commented 3 years ago

Rebased and retargeted on 1.20 and dropped all the unnecessary drop! patches.

WebDrake commented 3 years ago

Closing as superseded by more recent changes.