From 85c70a8d6b380191fad994e7c62d94caee17a0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Pe=C3=B1acoba?= Date: Thu, 9 Nov 2023 15:03:08 +0100 Subject: [PATCH] Always enable assertions in OmpSs-2 LLVM There are important assertions for OmpSs-2 to catch early bugs. Building without asserts enabled causes warnings due to unused variables. Reviewed-By: Rodrigo Arias Mallo Tested-By: Rodrigo Arias Mallo --- pkgs/llvm-ompss2/clang.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/llvm-ompss2/clang.nix b/pkgs/llvm-ompss2/clang.nix index 0112de9..43bf065 100644 --- a/pkgs/llvm-ompss2/clang.nix +++ b/pkgs/llvm-ompss2/clang.nix @@ -85,7 +85,6 @@ in stdenv.mkDerivation rec { cmakeBuildType = if enableDebug then "Debug" else "Release"; dontUseCmakeBuildDir = true; - enableAssertions = if enableDebug then "ON" else "OFF"; # Fix the host triple, as it has changed in a newer config.guess: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=commitdiff;h=ca9bfb8cc75a2be1819d89c664a867785c96c9ba @@ -105,7 +104,7 @@ in stdenv.mkDerivation rec { "-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,-gdb-index" "-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml" "-DLLVM_ENABLE_PROJECTS=clang;openmp;compiler-rt;lld" - "-DLLVM_ENABLE_ASSERTIONS=${enableAssertions}" + "-DLLVM_ENABLE_ASSERTIONS=ON" "-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON" "-DCMAKE_INSTALL_BINDIR=bin" "-DLLVM_ENABLE_ZLIB=FORCE_ON"