diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-22 16:41:59 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-22 16:41:59 +0100 |
commit | 46a88117a05c3469af5d99433af140c3de8ca088 (patch) | |
tree | d7f0557756d8f07a3081b3498c05ddc5a8ad429d /nixpkgs/pkgs/development/compilers/llvm | |
parent | e97457545cea0b2ca421da257c83d8f1ef451d85 (diff) | |
parent | a343533bccc62400e8a9560423486a3b6c11a23b (diff) | |
download | nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.gz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.bz2 nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.lz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.xz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.zst nixlib-46a88117a05c3469af5d99433af140c3de8ca088.zip |
Merge commit 'a343533bccc62400e8a9560423486a3b6c11a23b'
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm')
10 files changed, 33 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix index e71d63859a06..5e22d3f4af16 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/llvm/default.nix @@ -212,6 +212,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix index 3ac3ee24aec4..d75ce3b3b052 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/12/llvm/default.nix @@ -202,6 +202,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix index faebfb6e2bfd..58e742b9b41e 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -164,6 +164,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix index ed7d238ddaee..124d07e4bb2b 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/14/llvm/default.nix @@ -168,6 +168,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix index 7f1232d57a18..d7ebcbcf8b76 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/15/llvm/default.nix @@ -300,6 +300,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix index db9385043be2..143076c3f76e 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/16/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/16/default.nix @@ -149,6 +149,10 @@ in let inherit llvm_meta; }; + mlir = callPackage ../common/mlir { + inherit llvm_meta; + }; + lldb = callPackage ../common/lldb.nix { src = callPackage ({ runCommand }: runCommand "lldb-src-${version}" {} '' mkdir -p "$out" diff --git a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix index 661866c1890b..aed9c367d1ad 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/16/llvm/default.nix @@ -287,6 +287,8 @@ in # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix index 7d5e8389eba9..f8f1c67670ec 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm/default.nix @@ -203,6 +203,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix b/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix index 8e99fa0fe337..7a79ac30ba86 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/common/mlir/default.nix @@ -17,22 +17,28 @@ stdenv.mkDerivation rec { src = runCommand "${pname}-src-${version}" {} '' mkdir -p "$out" cp -r ${monorepoSrc}/cmake "$out" - cp -r ${monorepoSrc}/${pname} "$out" + cp -r ${monorepoSrc}/mlir "$out" cp -r ${monorepoSrc}/third-party "$out/third-party" mkdir -p "$out/llvm" ''; - sourceRoot = "${src.name}/${pname}"; + sourceRoot = "${src.name}/mlir"; patches = [ ./gnu-install-dirs.patch ]; - nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ libllvm libxml2 ]; + nativeBuildInputs = [ + cmake + ninja + ]; + + buildInputs = [ + libllvm + libxml2 + ]; - ninjaFlags = [ "-v " ]; cmakeFlags = [ "-DLLVM_BUILD_TOOLS=ON" # Install headers as well @@ -45,11 +51,11 @@ stdenv.mkDerivation rec { "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" "-DLLVM_ENABLE_DUMP=ON" - ] ++ lib.optionals stdenv.hostPlatform.isStatic [ + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ # Disables building of shared libs, -fPIC is still injected by cc-wrapper "-DLLVM_ENABLE_PIC=OFF" "-DLLVM_BUILD_STATIC=ON" - "-DLLVM_LINK_LLVM_DYLIB=off" + "-DLLVM_LINK_LLVM_DYLIB=OFF" ] ++ lib.optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" "-DMLIR_TABLEGEN_EXE=${buildLlvmTools.mlir}/bin/mlir-tblgen" diff --git a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix index b8cef2287806..6dc2b51aaf9a 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/git/llvm/default.nix @@ -290,6 +290,8 @@ stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let |