Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-12-08 18:00:53 +00:00 committed by GitHub
commit 5f3708016c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
146 changed files with 4505 additions and 1893 deletions

View File

@ -42,7 +42,7 @@ let
database = lib.last (lib.splitString "/" noSchema);
};
postgresDBs = [
postgresDBs = builtins.filter isPostgresql [
cfg.settings.database
cfg.settings.crypto_database
cfg.settings.plugin_databases.postgres

View File

@ -265,7 +265,7 @@ in
linkProfileToPath = acc: profile: location: let
guixProfile = "${cfg.stateDir}/guix/profiles/per-user/\${USER}/${profile}";
in acc + ''
[ -d "${guixProfile}" ] && ln -sf "${guixProfile}" "${location}"
[ -d "${guixProfile}" ] && [ -L "${location}" ] || ln -sf "${guixProfile}" "${location}"
'';
activationScript = lib.foldlAttrs linkProfileToPath "" guixUserProfiles;

View File

@ -64,8 +64,10 @@ in
};
systemd.services.iwd = {
path = [ config.networking.resolvconf.package ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ configFile ];
serviceConfig.ReadWritePaths = "-/etc/resolv.conf";
};
};

View File

@ -50,7 +50,7 @@ in
};
defaultVoicePort = mkOption {
type = types.int;
type = types.port;
default = 9987;
description = lib.mdDoc ''
Default UDP port for clients to connect to virtual servers - used for first virtual server, subsequent ones will open on incrementing port numbers by default.
@ -67,7 +67,7 @@ in
};
fileTransferPort = mkOption {
type = types.int;
type = types.port;
default = 30033;
description = lib.mdDoc ''
TCP port opened for file transfers.
@ -84,10 +84,26 @@ in
};
queryPort = mkOption {
type = types.int;
type = types.port;
default = 10011;
description = lib.mdDoc ''
TCP port opened for ServerQuery connections.
TCP port opened for ServerQuery connections using the raw telnet protocol.
'';
};
querySshPort = mkOption {
type = types.port;
default = 10022;
description = lib.mdDoc ''
TCP port opened for ServerQuery connections using the SSH protocol.
'';
};
queryHttpPort = mkOption {
type = types.port;
default = 10080;
description = lib.mdDoc ''
TCP port opened for ServerQuery connections using the HTTP protocol.
'';
};
@ -128,7 +144,9 @@ in
];
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.fileTransferPort ] ++ optionals (cfg.openFirewallServerQuery) [ cfg.queryPort (cfg.queryPort + 11) ];
allowedTCPPorts = [ cfg.fileTransferPort ] ++ (map (port:
mkIf cfg.openFirewallServerQuery port
) [cfg.queryPort cfg.querySshPort cfg.queryHttpPort]);
# subsequent vServers will use the incremented voice port, let's just open the next 10
allowedUDPPortRanges = [ { from = cfg.defaultVoicePort; to = cfg.defaultVoicePort + 10; } ];
};
@ -141,13 +159,19 @@ in
serviceConfig = {
ExecStart = ''
${ts3}/bin/ts3server \
dbsqlpath=${ts3}/lib/teamspeak/sql/ logpath=${cfg.logPath} \
${optionalString (cfg.voiceIP != null) "voice_ip=${cfg.voiceIP}"} \
dbsqlpath=${ts3}/lib/teamspeak/sql/ \
logpath=${cfg.logPath} \
license_accepted=1 \
default_voice_port=${toString cfg.defaultVoicePort} \
${optionalString (cfg.fileTransferIP != null) "filetransfer_ip=${cfg.fileTransferIP}"} \
filetransfer_port=${toString cfg.fileTransferPort} \
query_port=${toString cfg.queryPort} \
query_ssh_port=${toString cfg.querySshPort} \
query_http_port=${toString cfg.queryHttpPort} \
${optionalString (cfg.voiceIP != null) "voice_ip=${cfg.voiceIP}"} \
${optionalString (cfg.fileTransferIP != null) "filetransfer_ip=${cfg.fileTransferIP}"} \
${optionalString (cfg.queryIP != null) "query_ip=${cfg.queryIP}"} \
query_port=${toString cfg.queryPort} license_accepted=1
${optionalString (cfg.queryIP != null) "query_ssh_ip=${cfg.queryIP}"} \
${optionalString (cfg.queryIP != null) "query_http_ip=${cfg.queryIP}"} \
'';
WorkingDirectory = cfg.dataDir;
User = user;

View File

@ -333,10 +333,10 @@ in
cfg.settings.watch-dir;
StateDirectory = [
"transmission"
"transmission/.config/transmission-daemon"
"transmission/.incomplete"
"transmission/Downloads"
"transmission/watch-dir"
"transmission/${settingsDir}"
"transmission/${incompleteDir}"
"transmission/${downloadsDir}"
"transmission/${watchDir}"
];
StateDirectoryMode = mkDefault 750;
# The following options are only for optimizing:

View File

@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "praat";
version = "6.3.20";
version = "6.4";
src = fetchFromGitHub {
owner = "praat";
repo = "praat";
rev = "v${finalAttrs.version}";
hash = "sha256-hVQPLRyDXrqpheAqzC/hQ/ZaFxP1c7ClAJQs3wlEcGc=";
hash = "sha256-S05A8e3CFzQA7NtZlt85OfkS3cF05QSMWLcuR4UMCV8=";
};
nativeBuildInputs = [

View File

@ -17,13 +17,13 @@
stdenv.mkDerivation rec {
pname = "timeshift";
version = "23.07.1";
version = "23.12.1";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "timeshift";
rev = version;
sha256 = "RnArZTzvH+mdT7zAHTRem8+Z8CFjWVvd3p/HwZC/v+U=";
sha256 = "uesedEXPfvI/mRs8BiNkv8B2vVxmtTSaIvlQIsajkVg=";
};
patches = [

View File

@ -14,14 +14,14 @@ let
in
stdenv.mkDerivation rec {
pname = "aseprite";
version = "1.2.40";
version = "1.3";
src = fetchFromGitHub {
owner = "aseprite";
repo = "aseprite";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-KUdJA6HTAKrLT8xrwFikVDbc5RODysclcsEyQekMRZo=";
hash = "sha256-MSLStUmKAbGKFOQmUcRVrkjZCDglSjTmC6MGWJOCjKU=";
};
nativeBuildInputs = [

View File

@ -3136,15 +3136,17 @@ let
mktplcRef = {
publisher = "shd101wyy";
name = "markdown-preview-enhanced";
version = "0.6.10";
sha256 = "sha256-nCsl7ZYwuTvNZSTUMR6jEywClmcPm8xW6ABu9220wJI=";
version = "0.8.10";
sha256 = "sha256-BjTV2uH9QqCS1VJ94XXgzNMJb4FB4Ee+t/5uAQfJCuM=";
};
meta = {
description = "Provides a live preview of markdown using either markdown-it or pandoc";
longDescription = ''
Markdown Preview Enhanced provides you with many useful functionalities
such as automatic scroll sync, math typesetting, mermaid, PlantUML,
pandoc, PDF export, code chunk, presentation writer, etc.
Markdown Preview Enhanced is an extension that provides you with
many useful functionalities such as automatic scroll sync, math
typesetting, mermaid, PlantUML, pandoc, PDF export, code chunk,
presentation writer, etc. A lot of its ideas are inspired by
Markdown Preview Plus and RStudio Markdown.
'';
homepage = "https://github.com/shd101wyy/vscode-markdown-preview-enhanced";
license = lib.licenses.ncsa;

File diff suppressed because it is too large Load Diff

View File

@ -26,13 +26,13 @@
stdenv.mkDerivation rec {
pname = "rnote";
version = "0.9.2";
version = "0.9.3";
src = fetchFromGitHub {
owner = "flxzt";
repo = "rnote";
rev = "v${version}";
hash = "sha256-LLJurn5KJBlTtFrQXcc7HZqtIATOLgiwJqUsZe4cRIo=";
hash = "sha256-TeOBLPQc4y1lstqZUBDS3vUPama80UieifmxL2Qswvw=";
};
cargoDeps = rustPlatform.importCargoLock {

View File

@ -24,7 +24,7 @@
, srcs
# provided as callPackage input to enable easier overrides through overlays
, cargoSha256 ? "sha256-YR7d8F1LWDHY+h2ZQe52u3KWIeEMTnrbU4DO+hpIOec="
, cargoSha256 ? "sha256-EXsAvI8dKgCGmLbGr9fdk/F9UwtSfd/aIyqAy5tvFSI="
}:
mkDerivation rec {

View File

@ -1 +1 @@
WGET_ARGS=( https://download.kde.org/stable/release-service/23.08.3/src -A '*.tar.xz' )
WGET_ARGS=( https://download.kde.org/stable/release-service/23.08.4/src -A '*.tar.xz' )

File diff suppressed because it is too large Load Diff

View File

@ -3,15 +3,15 @@
}:
let
pname = "josm";
version = "18906";
version = "18907";
srcs = {
jar = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
hash = "sha256-/G3/v7pkRYqxvhYRthmU/20U8cYUkwZ+/VJXvpzeRPE=";
hash = "sha256-EASSuZn18oruUmPFNZ1Bwv0krTJa0tw4ddTJzkGEjW8=";
};
macosx = fetchurl {
url = "https://josm.openstreetmap.de/download/macosx/josm-macos-${version}-java17.zip";
hash = "sha256-+CDnAQK4ekFCoWvd8+kQLNqycD7tIQ/D7VAyrDU030A=";
hash = "sha256-tEJKBst+n669JENURd9ipFzV7yS/JZWEYkflq8d4g2Q=";
};
pkg = fetchsvn {
url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested";

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "mediainfo";
version = "23.10";
version = "23.11";
src = fetchurl {
url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz";
hash = "sha256-t0OuJSHZ2Oi5pYUNfCop3jC6d321JzjQ37oXzARnduc=";
hash = "sha256-gByxsNG//MEibeymISoe41Mi6LsSYwozu7B6kqioycM=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "pe-bear";
version = "0.6.5.2";
version = "0.6.6";
src = fetchFromGitHub {
owner = "hasherezade";
repo = "pe-bear";
rev = "v${version}";
sha256 = "sha256-00OebZZUUwQ1yruTKEUj+bNEKY/CuzdLEbejnnagPnY=";
sha256 = "sha256-WuuhQxjmV/AlmM1z85paUbpIaBht4fgqY8yvtZ0hPKQ=";
fetchSubmodules = true;
};

View File

@ -9,14 +9,14 @@
"vendorHash": null
},
"acme": {
"hash": "sha256-Yw+mkmRmetNKQhS5jpJ946ISj6Ga+G6hFArT0iVWNJ0=",
"hash": "sha256-hDZY+AY+MRHNbceVdAzLso9isUo/6/qTCk9hSZLBd2g=",
"homepage": "https://registry.terraform.io/providers/vancluever/acme",
"owner": "vancluever",
"proxyVendor": true,
"repo": "terraform-provider-acme",
"rev": "v2.18.0",
"rev": "v2.19.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-xpcloyR34rkarjJM2PWiLzFaJCpXWqPCP49Pmnk29nY="
"vendorHash": "sha256-1OfGAuzd+rLAgLmzzkm3Biru0vb/xd3C5DJQcXwdlME="
},
"age": {
"hash": "sha256-bJrzjvkrCX93bNqCA+FdRibHnAw6cb61StqtwUY5ok4=",
@ -37,20 +37,20 @@
"vendorHash": "sha256-gRcWzrI8qNpP/xxGV6MOYm79h4mH4hH+NW8W2BbGdYw="
},
"akamai": {
"hash": "sha256-Du0ANsAHzV6zKobpiJzdy26JgIW1NRO6fbAHNMCDbaI=",
"hash": "sha256-CBBrX0mm6hyobOdhbDaud4HKupIMnDTJp7+kWSej+NI=",
"homepage": "https://registry.terraform.io/providers/akamai/akamai",
"owner": "akamai",
"repo": "terraform-provider-akamai",
"rev": "v5.4.0",
"rev": "v5.5.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-4w3zYSO0GIL636FFuv1X4covAyFHVQ2Ah9N4RUQd7wM="
"vendorHash": "sha256-Y30DSv7gAW7JzaTYt0XGwLhTArFILPPnxYmP2mKe9Sc="
},
"alicloud": {
"hash": "sha256-GdoesVK4awNjMMBE6YuLIMh23WyMLKxABWLQ/y5H4kw=",
"hash": "sha256-bNTC4gvgeOR3v2AgvyL4Nr0Xhe4y8ZqTXPNBp9Mx3Dc=",
"homepage": "https://registry.terraform.io/providers/aliyun/alicloud",
"owner": "aliyun",
"repo": "terraform-provider-alicloud",
"rev": "v1.212.0",
"rev": "v1.213.1",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -82,22 +82,22 @@
"vendorHash": "sha256-q9PO9tMbaXTs3nBLElwU05GcDZMZqNmLVVGDmiSRSfo="
},
"artifactory": {
"hash": "sha256-F491M8AS+nh4fCPUA/6R9c6MQ6CB29QJsWjk1L5LOwI=",
"hash": "sha256-XZLVJDBXCRy1TethERChTh2vw5ztjHNgjoVmPwtwA2E=",
"homepage": "https://registry.terraform.io/providers/jfrog/artifactory",
"owner": "jfrog",
"repo": "terraform-provider-artifactory",
"rev": "v9.8.0",
"rev": "v9.9.2",
"spdx": "Apache-2.0",
"vendorHash": "sha256-Ne0ed+H6lPEH5uTYS98pLIf+7B1w+HSM77tGGG9E5RQ="
"vendorHash": "sha256-13k6iTO16wDhdw8kAyWZ3aRwKKH4zZi1Ybw/j/lqscE="
},
"auth0": {
"hash": "sha256-ShwoPwEQLNX1+LB84iWrS5VopKt8kao35/iVVGLDZck=",
"hash": "sha256-z40zGGgKtru83KbmhK5kQhbHdXjCQ7q5G0eAfvqfa4A=",
"homepage": "https://registry.terraform.io/providers/auth0/auth0",
"owner": "auth0",
"repo": "terraform-provider-auth0",
"rev": "v1.1.0",
"rev": "v1.1.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-fD3epndk6L+zjtUNalis9VJCxWKOBScYGHkUFRnLNLQ="
"vendorHash": "sha256-/rT/dVpla6r3pIouZZ7tmluKDyjdYuzdMGoPCNn+Ptk="
},
"avi": {
"hash": "sha256-EGpHajrTTOx7LrFHzsrrkGMqsuUEJLJAN6AJ48QdJis=",
@ -118,29 +118,29 @@
"vendorHash": null
},
"aws": {
"hash": "sha256-4ecgttYOAQ/I+ma1eSPomiJ4rdT9F1gtQUu4OS4stlQ=",
"hash": "sha256-W+lfTvDZtKbWSfZR9nu+xpfe5D5v0sP26qyskAuXyQ4=",
"homepage": "https://registry.terraform.io/providers/hashicorp/aws",
"owner": "hashicorp",
"repo": "terraform-provider-aws",
"rev": "v5.25.0",
"rev": "v5.30.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-twXEX5emBPQUMQcf11S9ZKfuaGv74LtXUE2LxqmN2xo="
"vendorHash": "sha256-jB1I82xcs16kvxxKcC+gC0LwXqDyT9qtpjgPoefZoZM="
},
"azuread": {
"hash": "sha256-PwHnyw0sZurUMLWKUmC3ULB8bc9adIU5C9WzVqBsLBA=",
"hash": "sha256-qFfquWG5/sm7jzqNMhDHFTKObGhGCyWgId4RxAMB5dM=",
"homepage": "https://registry.terraform.io/providers/hashicorp/azuread",
"owner": "hashicorp",
"repo": "terraform-provider-azuread",
"rev": "v2.45.0",
"rev": "v2.46.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
"azurerm": {
"hash": "sha256-sGZvfjq2F1BjvqgYel0P/ofGmHXv8c7OhfXGGoXB2+Q=",
"hash": "sha256-r6GS/m4fgVV7SjX8uExHQbJ1wlmyQm2LTwTi+uETKA0=",
"homepage": "https://registry.terraform.io/providers/hashicorp/azurerm",
"owner": "hashicorp",
"repo": "terraform-provider-azurerm",
"rev": "v3.80.0",
"rev": "v3.83.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -154,29 +154,29 @@
"vendorHash": null
},
"baiducloud": {
"hash": "sha256-N2WfSCro4jVZSXTe41hs4uQsmnhbsfl/J2o51YEOsB4=",
"hash": "sha256-LAUkF8QUA5I1QfNfEtpZl0LT8ifFa/oYJsLRJYp7TGk=",
"homepage": "https://registry.terraform.io/providers/baidubce/baiducloud",
"owner": "baidubce",
"repo": "terraform-provider-baiducloud",
"rev": "v1.19.20",
"rev": "v1.19.23",
"spdx": "MPL-2.0",
"vendorHash": null
},
"bigip": {
"hash": "sha256-eiwnIsGVGrOxSwrZj+UAq5sl2w2eT6tDCVQSnMBc/lk=",
"hash": "sha256-IfUMVksaXCzQD05khAY6s0qbAPd79omIzq6FCcMMjpg=",
"homepage": "https://registry.terraform.io/providers/F5Networks/bigip",
"owner": "F5Networks",
"repo": "terraform-provider-bigip",
"rev": "v1.20.0",
"rev": "v1.20.1",
"spdx": "MPL-2.0",
"vendorHash": null
},
"bitbucket": {
"hash": "sha256-dO+2sg+4Xg+9fxKe/hGF0EBS4yGZAzhIBgcBhT/VDWk=",
"hash": "sha256-jrxCUTqR6knktDIX3sFDtIP6OD9cJGdV+JgwSgoDfMo=",
"homepage": "https://registry.terraform.io/providers/DrFaust92/bitbucket",
"owner": "DrFaust92",
"repo": "terraform-provider-bitbucket",
"rev": "v2.37.2",
"rev": "v2.38.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-2s8ATVlSVa6n/OSay0oTdJXGdfnCwX6da3Pcu/xYcPY="
},
@ -190,13 +190,13 @@
"vendorHash": "sha256-/dOiXO2aPkuZaFiwv/6AXJdIADgx8T7eOwvJfBBoqg8="
},
"buildkite": {
"hash": "sha256-+H2ivPSrNBybUSYX2sLL4V8uqLTsJZp7AN1AYQQ/f90=",
"hash": "sha256-BKlDhEN2F2WrLmAagCAhteCWR1RY0y49MOPAEvUsnHo=",
"homepage": "https://registry.terraform.io/providers/buildkite/buildkite",
"owner": "buildkite",
"repo": "terraform-provider-buildkite",
"rev": "v1.0.6",
"rev": "v1.1.1",
"spdx": "MIT",
"vendorHash": "sha256-GzHqmSS0yWH+pNGA7ZbfpRkjUsc2F9vlJ9XEOjKxFS4="
"vendorHash": "sha256-fnB4yXzY6cr72v8MCGzkvNLxBSi3RDvQzyKk0eZ6CVs="
},
"checkly": {
"hash": "sha256-HfmEh+7RmCIjBvacBW6sX3PL295oHOo8Z+5YsFyl0/4=",
@ -226,13 +226,13 @@
"vendorHash": "sha256-dR/7rtDNj9bIRh6JMwXhWvLiAhXfrGnqS9QvfDH9eGw="
},
"cloudflare": {
"hash": "sha256-FdKz6EmpxhqM+wcCAuwTCOCxhV0LI4+7d12fNxOSd7Q=",
"hash": "sha256-KaFn0r5p7bE9kAK6g/SMyqfoF6vMWyP6bRqihW+a5a8=",
"homepage": "https://registry.terraform.io/providers/cloudflare/cloudflare",
"owner": "cloudflare",
"repo": "terraform-provider-cloudflare",
"rev": "v4.19.0",
"rev": "v4.20.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-PwIFz2T+iXR6+A/yrF4+kxWr2SxLDUY8XDO5aTeg89M="
"vendorHash": "sha256-sEy+G+IXwfLBCp1Rfw48mBH7WilsfoCQF5XbtF8fOCI="
},
"cloudfoundry": {
"hash": "sha256-yEqsdgTSlwppt6ILRZQ6Epyh5WVN6Il3xsBOa/NfIdo=",
@ -244,13 +244,13 @@
"vendorHash": "sha256-0hq4dR1KqnE2IXMwif2/NVKQKRO/QplW/A6sB4pJ+FM="
},
"cloudinit": {
"hash": "sha256-fdtUKD8XC1Y72IzrsCfTZYVYZwLqY3gV2sajiw4Krzw=",
"hash": "sha256-etZeCGtYhO0szRGxnj1c3/WOelxScWiHEA9w1Jb7bEE=",
"homepage": "https://registry.terraform.io/providers/hashicorp/cloudinit",
"owner": "hashicorp",
"repo": "terraform-provider-cloudinit",
"rev": "v2.3.2",
"rev": "v2.3.3",
"spdx": "MPL-2.0",
"vendorHash": "sha256-h4CO3sC41RPSmkTlWUCiRvQ1NRZkT2v1uHFOemvBN8s="
"vendorHash": "sha256-MFhKJEuylDnyj9ltugxGXgfIxBT3/mYaxB0JmTJxK3M="
},
"cloudscale": {
"hash": "sha256-SDivLkP1y/qBVNSiyCjV6zPTbLUplxzD3gNxzkjC51M=",
@ -272,13 +272,13 @@
"vendorHash": "sha256-UJHDX/vx3n/RTuQ50Y6TAhpEEFk9yBoaz8yK02E8Fhw="
},
"consul": {
"hash": "sha256-mGLI/TAovyBvowI6AwRPcmYqwnPEe4ibDhFj1t7I+oM=",
"hash": "sha256-Glgig56QdXZ9VNZx25/60YPChg9MtLq/S95nuAco3m0=",
"homepage": "https://registry.terraform.io/providers/hashicorp/consul",
"owner": "hashicorp",
"repo": "terraform-provider-consul",
"rev": "v2.19.0",
"rev": "v2.20.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-sOnEgGTboK+vbNQYUOP0TxLe2JsqBUFo6/k55paIsmM="
"vendorHash": "sha256-OKKcyx5JAQGMoUMRxIbe3lg825vhwCcWcPNZqo+/gl4="
},
"ct": {
"hash": "sha256-c1cqTfMlZ5fXDNMYLsk4447X0p/qIQYvRTqVY8cSs+E=",
@ -290,13 +290,13 @@
"vendorHash": "sha256-ZCMSmOCPEMxCSpl3DjIUGPj1W/KNJgyjtHpmQ19JquA="
},
"datadog": {
"hash": "sha256-IU9eBWYqI/a9EsYhI6kPom1PK/H403Dxr7eSXYFL5Do=",
"hash": "sha256-rpBj5fG3AXwuHiRzOx9svKDuDZqT5SdflUWNx4tXWGo=",
"homepage": "https://registry.terraform.io/providers/DataDog/datadog",
"owner": "DataDog",
"repo": "terraform-provider-datadog",
"rev": "v3.32.0",
"rev": "v3.33.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-C+N+LQ6qjpRrUNzCaiauIor+noD+0igTfR7RnrZdNwU="
"vendorHash": "sha256-Jzlwdc7lndrPK7JUQ2t4htMvwHj7BAJhfN7ajuTqAtc="
},
"dexidp": {
"hash": "sha256-Sy/xkhuNTocCoD7Nlq+pbvYiat4du4vZtOOZD2Ig3OA=",
@ -308,13 +308,14 @@
"vendorHash": "sha256-8gz6tsmHHH9B3Z5H0TZRdlpCI6LhthIn7fYn8PjYPeg="
},
"dhall": {
"hash": "sha256-K0j90YAzYqdyJD4aofyxAJF9QBYNMbhSVm/s1GvWuJ4=",
"hash": "sha256-QjY5ZazQn4HiLQtdmw9X7o5tFw+27B2IISzmzMMHjHE=",
"homepage": "https://registry.terraform.io/providers/awakesecurity/dhall",
"owner": "awakesecurity",
"proxyVendor": true,
"repo": "terraform-provider-dhall",
"rev": "v0.0.3",
"rev": "v0.0.7",
"spdx": "BSD-3-Clause",
"vendorHash": "sha256-BpXhKjfxyCLdGRHn1GexW0MoLj4/C6Bn7scZ76JARxQ="
"vendorHash": "sha256-e/+czUeOACwRC7xY90pZp2EWDzDpLU6Ud9RPzuNKaOY="
},
"digitalocean": {
"hash": "sha256-8T2xWKKoPU54ukMClva/fgZXGDMh92Oi0IacjnbgCCI=",
@ -380,31 +381,32 @@
"vendorHash": "sha256-oVTanZpCWs05HwyIKW2ajiBPz1HXOFzBAt5Us+EtTRw="
},
"equinix": {
"hash": "sha256-7RnThTuYTO1W0nBZAilUB5WOp8Rng14aNBiax6M9FwQ=",
"hash": "sha256-f965eEUtYoWf9idv0YHBMQTHGiIUUX/BeZQQegoxZ1s=",
"homepage": "https://registry.terraform.io/providers/equinix/equinix",
"owner": "equinix",
"proxyVendor": true,
"repo": "terraform-provider-equinix",
"rev": "v1.19.0",
"rev": "v1.20.1",
"spdx": "MIT",
"vendorHash": "sha256-nq380VsSog+nsL+U1KXkVUJqq3t4dJkrfbBH8tHm48E="
"vendorHash": "sha256-GAMXwx25xxBAx8X69vg+efljO0BUpKSrYoR2x95MXKM="
},
"exoscale": {
"hash": "sha256-Fc2/IT8L1jn0Oh8zT0C/Am4eoumQe0VRYqBDc/enEuY=",
"hash": "sha256-HVNGzcX0l7E4jB6TiWSPG9XRmpKL6HIt2gaYiDLFOb4=",
"homepage": "https://registry.terraform.io/providers/exoscale/exoscale",
"owner": "exoscale",
"repo": "terraform-provider-exoscale",
"rev": "v0.53.1",
"rev": "v0.54.1",
"spdx": "MPL-2.0",
"vendorHash": null
},
"external": {
"hash": "sha256-+0AqlVGKSEeXlcKfNiYDqh0B9rRqyt9FDNWstdOFACI=",
"hash": "sha256-rmCdTtyYv3jZDXWWqRLV8AgnnZ0Hqp8Ofq8BoLBkDhs=",
"homepage": "https://registry.terraform.io/providers/hashicorp/external",
"owner": "hashicorp",
"repo": "terraform-provider-external",
"rev": "v2.3.1",
"rev": "v2.3.2",
"spdx": "MPL-2.0",
"vendorHash": "sha256-E1gzdES/YVxQq2J47E2zosvud2C/ViBeQ8+RfNHMBAg="
"vendorHash": "sha256-mkopDoGhGZSJyxWYtR8OU9BU1GYwhLe3xwNkUKwlBNI="
},
"fastly": {
"hash": "sha256-T3iQ0QIB3lfzcTx1K7WkgUdKsl/hls2+eorPa0O19g8=",
@ -416,21 +418,21 @@
"vendorHash": null
},
"flexibleengine": {
"hash": "sha256-+RAuFh88idG49nV4HVPgaGxADw/k/sUSTqrzWjf15tw=",
"hash": "sha256-YWVJhBkhc62VabppH6TMO51PfaBwsLdakHOpmWXAprQ=",
"homepage": "https://registry.terraform.io/providers/FlexibleEngineCloud/flexibleengine",
"owner": "FlexibleEngineCloud",
"repo": "terraform-provider-flexibleengine",
"rev": "v1.43.0",
"rev": "v1.44.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-yin+UVMkqIxMSoVB4TD6Nv8F24FnEGZP5PFVpmuO2Fg="
"vendorHash": "sha256-bvMetztfnT7gSkTfhpnkvlnZeAAzuehuNqYN/Gx+DmY="
},
"fortios": {
"hash": "sha256-RpcKMndbO3wbkHmrINkbsQ+UeFsZrQ7x02dv8ZpFMec=",
"hash": "sha256-3fcbUH3/LjsdNbomN2tl2WN/P0rpf0ZsILVkAOLUbt0=",
"homepage": "https://registry.terraform.io/providers/fortinetdev/fortios",
"owner": "fortinetdev",
"proxyVendor": true,
"repo": "terraform-provider-fortios",
"rev": "1.18.0",
"rev": "1.18.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-DwRfbD4AqB+4KLuYtqY5fUdzRrEpTIvL4VAM7nieJJA="
},
@ -453,33 +455,33 @@
"vendorHash": null
},
"gitlab": {
"hash": "sha256-eONOqinRXs9lPz4d8WDb9lA0XcJuNqzgsZrmJAZ42t8=",
"hash": "sha256-IzZN7W1nfByUco4LG0AutSAVRHpeAnaHNmu6tpvHyQk=",
"homepage": "https://registry.terraform.io/providers/gitlabhq/gitlab",
"owner": "gitlabhq",
"repo": "terraform-provider-gitlab",
"rev": "v16.5.0",
"rev": "v16.6.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-2t50Gsyf8gxG/byjgNyw5GEturU0MgBvZuJyc49s4t0="
"vendorHash": "sha256-TMLLsOquMpkeAqS8hLI963hQ6t9n2fyx4XjtB+7oR2E="
},
"google": {
"hash": "sha256-o4tyG0Q4sqBktreYEKJ+1QlNXx/BEPmAGOTTzTcFnP8=",
"hash": "sha256-b4jUS7JNGIsgFEkbxhQRie1YSl1cqqR9UEoNnVSXO5Q=",
"homepage": "https://registry.terraform.io/providers/hashicorp/google",
"owner": "hashicorp",
"proxyVendor": true,
"repo": "terraform-provider-google",
"rev": "v5.6.0",
"rev": "v5.8.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-9nz3VLTi4RfGBDAE7JBUWXrJRajwAyxoeEH+VSP0wyQ="
"vendorHash": "sha256-P6ogYwe0Og1Ob/0pq3ZfUNsKss5K5csoQ7YwT/aS4m0="
},
"google-beta": {
"hash": "sha256-+5Fm/aT90bD6RpQrUGjmpmahPTjOfsRJAaZuZsrPQn4=",
"hash": "sha256-bd5kj6+lqU1bY30fvWku1h5wnVi4EqpmRBewhiDQjLY=",
"homepage": "https://registry.terraform.io/providers/hashicorp/google-beta",
"owner": "hashicorp",
"proxyVendor": true,
"repo": "terraform-provider-google-beta",
"rev": "v5.6.0",
"rev": "v5.8.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-9nz3VLTi4RfGBDAE7JBUWXrJRajwAyxoeEH+VSP0wyQ="
"vendorHash": "sha256-P6ogYwe0Og1Ob/0pq3ZfUNsKss5K5csoQ7YwT/aS4m0="
},
"googleworkspace": {
"hash": "sha256-dedYnsKHizxJZibuvJOMbJoux0W6zgKaK5fxIofKqCY=",
@ -491,13 +493,13 @@
"vendorHash": "sha256-fqVBnAivVekV+4tpkl+E6eNA3wi8mhLevJRCs3W7L2g="
},
"grafana": {
"hash": "sha256-8GBhJvv0JYHh98l1IRMsodYlFAkW5Lt1dJ03mPzTcts=",
"hash": "sha256-KXXqda3tx0dz+HCNtmmzcHg3kkJpo0FQWQtw1d+pWIE=",
"homepage": "https://registry.terraform.io/providers/grafana/grafana",
"owner": "grafana",
"repo": "terraform-provider-grafana",
"rev": "v2.6.1",
"rev": "v2.7.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-DOkDVQPTwB0l1VlfbvwJYiKRi/GE85cPzaY4JKnewaA="
"vendorHash": "sha256-E8K3iZsUuBdCw6zKiR1mynMPUFiEO8Kd5Sj10RHf998="
},
"gridscale": {
"hash": "sha256-gyUDWG7h3fRU0l0uyfmxd0Oi1TtQHnJutqahDoPZWgM=",
@ -518,13 +520,13 @@
"vendorHash": "sha256-oGABaZRnwZdS5qPmksT4x7Tin2WpU2Jk9pejeHbghm8="
},
"helm": {
"hash": "sha256-pgV1xXhg8WIyF4RhJwAenTI6eAmtINveO8zqrKzLajQ=",
"hash": "sha256-Zj0mZfQhZimk3QozKHNU7quO/SqV3278Y+l9bFa8w/k=",
"homepage": "https://registry.terraform.io/providers/hashicorp/helm",
"owner": "hashicorp",
"repo": "terraform-provider-helm",
"rev": "v2.11.0",
"rev": "v2.12.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-a80+gjjoFOKI96pUMvTMyM90F5oCb1Ime8hPQcFedFE="
"vendorHash": "sha256-qoXWnAbjRsvFDtlDCfeaIjc5hZIbCgosyH0pXhHkWiA="
},
"heroku": {
"hash": "sha256-M1HdcKHOVf/rxjECvHqnU6FRXE6T8TpI24Fo0gkZ6FU=",
@ -564,11 +566,11 @@
"vendorHash": "sha256-hxT9mpKifb63wlCUeUzgVo4UB2TnYZy9lXF4fmGYpc4="
},
"huaweicloud": {
"hash": "sha256-V6Ar0MXK7i927eDq8uvHZc3ivVonK9KBKqSZCCESgq0=",
"hash": "sha256-u46A6YyoU497tPOvxj3zef7vL48KHEQ/W5UFGQSoiu8=",
"homepage": "https://registry.terraform.io/providers/huaweicloud/huaweicloud",
"owner": "huaweicloud",
"repo": "terraform-provider-huaweicloud",
"rev": "v1.57.0",
"rev": "v1.58.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -591,13 +593,13 @@
"vendorHash": null
},
"ibm": {
"hash": "sha256-Od+aunGMjcQ4AF60dxWNAUVMQiAkFMSAquOhUp3icug=",
"hash": "sha256-LHj3oua4EnaWKs5kendY4zZvGeLI/dd0PyTcCsOytWo=",
"homepage": "https://registry.terraform.io/providers/IBM-Cloud/ibm",
"owner": "IBM-Cloud",
"repo": "terraform-provider-ibm",
"rev": "v1.59.0",
"rev": "v1.60.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-qp1TZmDr7X+2MCdlGTBLubJ7hF5Y9jqoFaj5mxgNLHE="
"vendorHash": "sha256-crz1eLJnXpqe5iAy3s7Cgo72o3pwjpeWPx29GKw0qAg="
},
"icinga2": {
"hash": "sha256-Y/Oq0aTzP+oSKPhHiHY9Leal4HJJm7TNDpcdqkUsCmk=",
@ -663,13 +665,13 @@
"vendorHash": "sha256-lXQHo66b9X0jZhoF+5Ix5qewQGyI82VPJ7gGzc2CHao="
},
"kubernetes": {
"hash": "sha256-aPplKT6L9Lmp4St6DLtHywiunqLaABEB9urbtSfK8Ec=",
"hash": "sha256-AAvGYVD+MTF8Ds992lrEgzc9naVbv/qz4+jZRLbieG0=",
"homepage": "https://registry.terraform.io/providers/hashicorp/kubernetes",
"owner": "hashicorp",
"repo": "terraform-provider-kubernetes",
"rev": "v2.23.0",
"rev": "v2.24.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-9AmfvoEf7E6lAblPIWizElng5GQJG/hQ5o6Mo3AN+EA="
"vendorHash": "sha256-kyQDioVlZFufhXRInXUPTW343LZFmB3SeTlLLRPwzRA="
},
"launchdarkly": {
"hash": "sha256-4vluO+efNhlYhnzNjvZD6ol0eIx3DWzQBTevMmRAfxM=",
@ -681,22 +683,22 @@
"vendorHash": "sha256-f/OJ+DoH/pc+A7bl1OOgsSU1PQC2ZEBuK7sSmcpA3tk="
},
"libvirt": {
"hash": "sha256-64wCem/eTCCyZvz96szsWoKrxKezsHQYoYZGKHBF8OY=",
"hash": "sha256-yGlNBbixrQxjh7zgZoK3YXpUmr1vrLiLZhKpXvQULYg=",
"homepage": "https://registry.terraform.io/providers/dmacvicar/libvirt",
"owner": "dmacvicar",
"repo": "terraform-provider-libvirt",
"rev": "v0.7.4",
"rev": "v0.7.6",
"spdx": "Apache-2.0",
"vendorHash": "sha256-dHzyNvzxNltCAmwYWQHOEKkhgfylUUhOtBPiBqIS1Qg="
"vendorHash": "sha256-K/PH8DAi6Wj+isPx9xefQcLPKnrimfItZFSPfktTias="
},
"linode": {
"hash": "sha256-ScuHyfnco5Xz6HrZ9YPQLdWKo1Hqu7LRteLHH2JxHXQ=",
"hash": "sha256-g8otBTOYPfhhExIcg1gzX+KV03Nsom7blNhJFGbyxDU=",
"homepage": "https://registry.terraform.io/providers/linode/linode",
"owner": "linode",
"repo": "terraform-provider-linode",
"rev": "v2.9.7",
"rev": "v2.10.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-5ALsYOuWLFGbIR3yVKmPeb0tQnx63p4WC98WdcxXeZ4="
"vendorHash": "sha256-KjrkF6v1NHXjdIaNz0dIJ7q98JYN1hm2OMh9+CEOFbs="
},
"linuxbox": {
"hash": "sha256-MzasMVtXO7ZeZ+qEx2Z+7881fOIA0SFzSvXVHeEROtg=",
@ -762,13 +764,13 @@
"vendorHash": "sha256-aIIkj0KpkIR+CsgPk4NCfhG7BMKaAQZy/49unQx4nWQ="
},
"mongodbatlas": {
"hash": "sha256-SMIc78haJiH0XdTr9OBGWOcvXfYQW9thcNkCOxmNxDw=",
"hash": "sha256-+aofX4YNHB30h20k3XvVqvzOSqg/cirFx8s7jH5cfiY=",
"homepage": "https://registry.terraform.io/providers/mongodb/mongodbatlas",
"owner": "mongodb",
"repo": "terraform-provider-mongodbatlas",
"rev": "v1.12.3",
"rev": "v1.13.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-B1trhV2/H5gP7EnUU7G45gIh95S2wYbANHsRM76CDWE="
"vendorHash": "sha256-khnctPCKKExkVkyFTQ+5EsJf7aFVFtPC5NeFenIjlQo="
},
"namecheap": {
"hash": "sha256-cms8YUL+SjTeYyIOQibksi8ZHEBYq2JlgTEpOO1uMZE=",
@ -816,13 +818,13 @@
"vendorHash": "sha256-nkpKq8cAusokeuOk32n8QA9He9zQlaTFzUwLMHKzpqM="
},
"null": {
"hash": "sha256-ExXDbAXMVCTZBlYmi4kD/7JFB1fCFAoPL637+1N6rEI=",
"hash": "sha256-KOwJXGvMc9Xgq4Kbr72aW6RDwzldUrU1C3aDxpKO3qE=",
"homepage": "https://registry.terraform.io/providers/hashicorp/null",
"owner": "hashicorp",
"repo": "terraform-provider-null",
"rev": "v3.2.1",
"rev": "v3.2.2",
"spdx": "MPL-2.0",
"vendorHash": "sha256-vXyE0/tXzFHJPNq8MZ+NZItDWS3K7ZhtY23hGjtqRh8="
"vendorHash": "sha256-9MeLKrKV3OESkJ4kTB9A9c9IYY1QsME0CODIoGU+anU="
},
"nutanix": {
"deleteVendor": true,
@ -835,22 +837,22 @@
"vendorHash": "sha256-LRIfxQGwG988HE5fftGl6JmBG7tTknvmgpm4Fu1NbWI="
},
"oci": {
"hash": "sha256-gk5KegQozeDg6ZqYsy+DxMczBOKxH0v3mHFRau/alFY=",
"hash": "sha256-tg+0KiiwEHkPImqxYHaLZjaoZDjIIGyBOXBFXe07G20=",
"homepage": "https://registry.terraform.io/providers/oracle/oci",
"owner": "oracle",
"repo": "terraform-provider-oci",
"rev": "v5.20.0",
"rev": "v5.22.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
"okta": {
"hash": "sha256-LCOuRsAX0ftacS0ecNQpYXKKumfCZ9a10bSuRJtD20E=",
"hash": "sha256-+lwR0/Q2lbBCDwQ0Hurhw8VhXOQzHqfMtD/dnedHIvU=",
"homepage": "https://registry.terraform.io/providers/okta/okta",
"owner": "okta",
"repo": "terraform-provider-okta",
"rev": "v4.6.1",
"rev": "v4.6.3",
"spdx": "MPL-2.0",
"vendorHash": "sha256-ZhF1c4cez43cCumU+PYufpEcprRDxY7hVCNQHdIEDtI="
"vendorHash": "sha256-sF/jKuP7d5nafda9UfwtvdSsoJAxyI10o+70vadwAHs="
},
"oktaasa": {
"hash": "sha256-2LhxgowqKvDDDOwdznusL52p2DKP+UiXALHcs9ZQd0U=",
@ -880,13 +882,13 @@
"vendorHash": "sha256-hVsqlWTZoYAMWMeismKhiqFxSFbkTBSIEMSLZx5stnQ="
},
"opentelekomcloud": {
"hash": "sha256-3p5R8thq5iWaeAsvqoA03UK6hzVGi4DlEe3PHJBP3xA=",
"hash": "sha256-97hDRXltZwxylS5E2GPU1h8Q8gdEV37ljKYrGLlIjiQ=",
"homepage": "https://registry.terraform.io/providers/opentelekomcloud/opentelekomcloud",
"owner": "opentelekomcloud",
"repo": "terraform-provider-opentelekomcloud",
"rev": "v1.35.11",
"rev": "v1.35.13",
"spdx": "MPL-2.0",
"vendorHash": "sha256-MD3tywosRUbkzeXQA2yTHr3p8RJlzNZVbrlTesDHpMI="
"vendorHash": "sha256-wiMHvONS1VKtLf245pVCgqmlvyx8nlBJda0vOuepPak="
},
"opsgenie": {
"hash": "sha256-IIQtbRKfLbJz5J/T/YzVWSivMeuyKO6iKlXmbrslpQo=",
@ -907,11 +909,11 @@
"vendorHash": null
},
"pagerduty": {
"hash": "sha256-4TplBhRU4k7ucDCsgWcqEok9tOADuZAwqOonAY+eLdY=",
"hash": "sha256-nG5zbpq6PN1Slm0PU6/1g++HByQyilZVLBnIz0akx5A=",
"homepage": "https://registry.terraform.io/providers/PagerDuty/pagerduty",
"owner": "PagerDuty",
"repo": "terraform-provider-pagerduty",
"rev": "v3.1.1",
"rev": "v3.3.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -979,13 +981,13 @@
"vendorHash": "sha256-2uNawlNPmByjoIjufl3yMfo2MdV+MsXqSRVEWursHKc="
},
"random": {
"hash": "sha256-IsXKdS3B5kWY5LlNKM0fYjp2uM96ngi6vZ9F46MmfcA=",
"hash": "sha256-8RRfoxDXa9pScyZ8CXBuWODlahd3lH0IzPaV0yb7GpI=",
"homepage": "https://registry.terraform.io/providers/hashicorp/random",
"owner": "hashicorp",
"repo": "terraform-provider-random",
"rev": "v3.5.1",
"rev": "v3.6.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-ScY/hAb14SzEGhKLpnJ8HrWOccwc2l0XW6t+f62LyWM="
"vendorHash": "sha256-f89G4Ln6JX1uJNeH7Vv69Fkibh1K3jOiULVvcn4ILao="
},
"remote": {
"hash": "sha256-x0mTouv+hRGznyn2XxohWzPb0vjJvJf6kDlWrLJ/JvA=",
@ -1006,13 +1008,13 @@
"vendorHash": null
},
"scaleway": {
"hash": "sha256-lOoxgWps6r4/7JhK0Z0Iz5EA2mHYNrdIgOntRqXFrH8=",
"hash": "sha256-LOWkUzxkNsj3OWLhQb/BSq0vxz0c4jKuf41L6F2Yqeo=",
"homepage": "https://registry.terraform.io/providers/scaleway/scaleway",
"owner": "scaleway",
"repo": "terraform-provider-scaleway",
"rev": "v2.33.0",
"rev": "v2.34.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-tly9+vClV/IGivNBY114lNXxnYjJVvhVAi1tEyCtIoo="
"vendorHash": "sha256-4m4RxV3AuBVfKDxsGxQK/B7b53w1IYayRakjZZ8xyZc="
},
"secret": {
"hash": "sha256-MmAnA/4SAPqLY/gYcJSTnEttQTsDd2kEdkQjQj6Bb+A=",
@ -1069,13 +1071,13 @@
"vendorHash": null
},
"snowflake": {
"hash": "sha256-O5Nt+CcVppo5w4gD+NQ/XrRbkJicIzQrh5gffjPNvvw=",
"hash": "sha256-Fox0BkmyRgAon0NH2HG50XqLRFUHwu6rnVrBwE11QqQ=",
"homepage": "https://registry.terraform.io/providers/Snowflake-Labs/snowflake",
"owner": "Snowflake-Labs",
"repo": "terraform-provider-snowflake",
"rev": "v0.75.0",
"rev": "v0.77.0",
"spdx": "MIT",
"vendorHash": "sha256-VD3zXfaa2fmq85a/k7LPbDVS1gA5xHC2F3Ojqpmt8MI="
"vendorHash": "sha256-iSSy6N7YwE76AmJ7s1nA/EBTdFAvA7G4rfl6Pc2QBSI="
},
"sops": {
"hash": "sha256-ZastswL5AVurQY3xn6yx3M1BMvQ9RjfcZdXX0S/oZqw=",
@ -1087,22 +1089,22 @@
"vendorHash": "sha256-8W1PK4T98iK1N6EB6AVjvr1P9Ja51+kSOmYAEosxrh8="
},
"spotinst": {
"hash": "sha256-mYLIOnWI1yzfmuKikDib4PIDLJulGBqvo2OkGmUt7fw=",
"hash": "sha256-NSbMR8wkiAYC0KiCukEnKG7nIye4KMzpIIYnnwEh6jY=",
"homepage": "https://registry.terraform.io/providers/spotinst/spotinst",
"owner": "spotinst",
"repo": "terraform-provider-spotinst",
"rev": "v1.149.0",
"rev": "v1.151.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-6UUXMcfyIiZWc7HSy3P8gc7i1L9cVjifwREfmw05Qco="
"vendorHash": "sha256-TDOgH9G6Hr3+mwL5JhAlcbsV3auzyJTu9qgV0s9AArE="
},
"stackpath": {
"hash": "sha256-7KQUddq+M35WYyAIAL8sxBjAaXFcsczBRO1R5HURUZg=",
"hash": "sha256-aCaoRxlV/UxYobHC5OqFO8nt9oQgyug1AuJffhnwauc=",
"homepage": "https://registry.terraform.io/providers/stackpath/stackpath",
"owner": "stackpath",
"repo": "terraform-provider-stackpath",
"rev": "v1.5.0",
"rev": "v2.0.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-OGYiynCwbJU2KisS7Y6xmLuBKOtQvh3MWPrvBk/x95U="
"vendorHash": "sha256-G+5vSXhxmt0Qsqt7vnecPZfIxAonNF3l7ygQZ0nemnU="
},
"statuscake": {
"hash": "sha256-zXBZZA+2uRN2FeGrayq0a4EBk7T+PvlBIwbuxwM7yBc=",
@ -1114,11 +1116,11 @@
"vendorHash": "sha256-9M1DsE/FPQK8TG7xCJWbU3HAJCK3p/7lxdzjO1oAfWs="
},
"sumologic": {
"hash": "sha256-5/PaEGKG8M/XifRelqV1aL6ARXRVvOYY/uka+grijzg=",
"hash": "sha256-HMjghu/2Q7rPkVKO5qtKAqEZFexbK3lfiylwB8Q2sYw=",
"homepage": "https://registry.terraform.io/providers/SumoLogic/sumologic",
"owner": "SumoLogic",
"repo": "terraform-provider-sumologic",
"rev": "v2.27.0",
"rev": "v2.28.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-iNBM4Y24vDGPKyb5cppSogk145F0/pAFmOzEeiWgfLI="
},
@ -1141,11 +1143,11 @@
"vendorHash": "sha256-0HRhwUGDE4y7UFlXyD0w8zl4NV5436L4SRhrb8vQGyc="
},
"tencentcloud": {
"hash": "sha256-o9PY7kZAsF/bOkmIa0QKW2SabK0u56FtjMxmlKNROBg=",
"hash": "sha256-kApeR6LaFOUocf2NV+dDArAQ0HhgHwp7BZQBJbhTiDc=",
"homepage": "https://registry.terraform.io/providers/tencentcloudstack/tencentcloud",
"owner": "tencentcloudstack",
"repo": "terraform-provider-tencentcloud",
"rev": "v1.81.45",
"rev": "v1.81.55",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -1168,22 +1170,22 @@
"vendorHash": null
},
"time": {
"hash": "sha256-FehWmIkL0o2pleafN/mlBa46cdFqCFUS+coOwFPdb9M=",
"hash": "sha256-5AOp6y/Nmu59uB9QXqwkcgakyzAyiAclZ9EJa7+MvpY=",
"homepage": "https://registry.terraform.io/providers/hashicorp/time",
"owner": "hashicorp",
"repo": "terraform-provider-time",
"rev": "v0.9.1",
"rev": "v0.10.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-MLh/we8KNrDBy2BAMZ6B/gBe0p3xJ7l/imNzTHciJjs="
"vendorHash": "sha256-TrkmjqUJi28sN9POzEuKzKyPQiS1RtVpj9NbsM3jW0I="
},
"tls": {
"hash": "sha256-DBOkfvT0+mlgaWiBHggZUKvHL8jLZjQjRi0xFZKgcoM=",
"hash": "sha256-2K18jY2+oPvelMtZ2o4WJcAPhc93nCvJdHq+VNfmWZI=",
"homepage": "https://registry.terraform.io/providers/hashicorp/tls",
"owner": "hashicorp",
"repo": "terraform-provider-tls",
"rev": "v4.0.4",
"rev": "v4.0.5",
"spdx": "MPL-2.0",
"vendorHash": "sha256-k7aW5ZD6pAtdT6tTXy8YaJlFS5WR5FzPd9eINgPBYJM="
"vendorHash": "sha256-6uzqx9Tz9JcHYHhG/tWYJaUP8yWe533gB0h1+YF+tgQ="
},
"triton": {
"deleteVendor": true,
@ -1205,11 +1207,11 @@
"vendorHash": null
},
"ucloud": {
"hash": "sha256-eCJXqCtNWPsJzlEPdGHK1NMxASTqQBIFAWSVGbyiKn0=",
"hash": "sha256-D6nrIjw4m2loeZRKNvrmgNQ4oaHKEc2xjxrWcgE8LNw=",
"homepage": "https://registry.terraform.io/providers/ucloud/ucloud",
"owner": "ucloud",
"repo": "terraform-provider-ucloud",
"rev": "v1.38.2",
"rev": "v1.38.3",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -1223,11 +1225,11 @@
"vendorHash": "sha256-vFfwa8DfmiHpbBbXPNovPC7SFoXRjyHRwOVqBcWCEtI="
},
"vault": {
"hash": "sha256-9SOHw46KChe7bGInsIIyy0pyNG3K7CXNEomHkmpt8d4=",
"hash": "sha256-Db56SNnIHUuiIUKFKC5NwWaIbfsT85GZ95UBR+PUSMY=",
"homepage": "https://registry.terraform.io/providers/hashicorp/vault",
"owner": "hashicorp",
"repo": "terraform-provider-vault",
"rev": "v3.22.0",
"rev": "v3.23.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-5rRWlInDRj7hw4GZqTxfH7Y8tyTvzJgBWA1I5j0EyaI="
},
@ -1268,13 +1270,13 @@
"vendorHash": null
},
"vsphere": {
"hash": "sha256-3kBxS8JeYYjILfpeq58fYt6j2vQXEHRXoxZBfOhCptA=",
"hash": "sha256-+YNvyieuyG4CePm4Pxsy1ufHgvjRJC9yRPLIMUcgrqs=",
"homepage": "https://registry.terraform.io/providers/hashicorp/vsphere",
"owner": "hashicorp",
"repo": "terraform-provider-vsphere",
"rev": "v2.5.1",
"rev": "v2.6.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-4ulRYzb4bzk0TztT04CwqlnMGw8tp7YnoCm2/NqGN7Y="
"vendorHash": "sha256-d9CdK5AHFZRC89Xko4vyx8jR10fkG1VYGVILlXM7zgw="
},
"vultr": {
"hash": "sha256-9HEuJXV6spLoLEVwdNid+MfVrBvrdUKjHWkDvQLSG+s=",
@ -1295,12 +1297,12 @@
"vendorHash": "sha256-GRnVhGpVgFI83Lg34Zv1xgV5Kp8ioKTFV5uaqS80ATg="
},
"yandex": {
"hash": "sha256-QirLhOAvOcsMFR0ZWHCCI2wbfcD5hfHSlZ0bguvAHiI=",
"hash": "sha256-GL7KrjnSucf8LECPT0T1kxehGqqGP6tlnJW1rlHX5cM=",
"homepage": "https://registry.terraform.io/providers/yandex-cloud/yandex",
"owner": "yandex-cloud",
"repo": "terraform-provider-yandex",
"rev": "v0.102.0",
"rev": "v0.103.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-y8M50X2F4olM1I0i32uUd/FASY9wUnMOF5k4AEP6b9I="
"vendorHash": "sha256-FVFBwrSASFt6YT30/UplF51jxauhtUZh7IdfKh8WLSE="
}
}

View File

@ -44,13 +44,13 @@ rec {
thunderbird-115 = (buildMozillaMach rec {
pname = "thunderbird";
version = "115.4.2";
version = "115.5.1";
application = "comm/mail";
applicationName = "Mozilla Thunderbird";
binaryName = pname;
src = fetchurl {
url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz";
sha512 = "44cedd5931edbac2ab0babfaf0e71a0262317c01fd7d71e8740bb8f54766c9b49b9e325f1d2796c3a233d4298457d8769b675213a21bef759c46086080bcc8bc";
sha512 = "5ddc39b3591427d283c5497f68a1d722409aba54d53342a36a259daa219d8135ecf88868b12235eb9536f46f825722cf6da2781b71a2e10b816281231394b4f9";
};
extraPatches = [
# The file to be patched is different from firefox's `no-buildconfig-ffx90.patch`.

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchPypi
, python3
, makeWrapper
, libtorrent-rasterbar-1_2_x
@ -12,16 +13,19 @@ let
in
stdenv.mkDerivation rec {
pname = "tribler";
version = "7.11.0";
version = "7.13.0";
src = fetchurl {
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz";
sha256 = "0ffh8chb47iaar8872gvalgm84fjzyxph16nixsxknnprqdxyrkx";
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-${version}.tar.xz";
hash = "sha256-j9+Kq6dOqiJCTY3vuRWGnciuwACU7L0pl73l6nkDLN4=";
};
nativeBuildInputs = [
python3.pkgs.wrapPython
makeWrapper
# we had a "copy" of this in tribler's makeWrapper
# but it went out of date and broke, so please just use it directly
qt5.wrapQtAppsHook
];
buildInputs = [
@ -31,38 +35,49 @@ stdenv.mkDerivation rec {
pythonPath = [
libtorrent
] ++ (with python3.pkgs; [
# requirements-core.txt
aiohttp
aiohttp-apispec
asynctest
anyio
chardet
cherrypy
configobj
cryptography
decorator
faker
feedparser
libnacl
lz4
m2crypto
marshmallow
netifaces
networkx
pillow
pony
psutil
pyasn1
pycrypto
pyqt5
pyqtgraph
pytest-asyncio
pytest-timeout
pydantic
pyopenssl
pyyaml
requests
sentry-sdk
service-identity
twisted
yappi
pydantic
anyio
yarl
bitarray
(pyipv8.overrideAttrs (p: rec {
version = "2.10.0";
src = fetchPypi {
inherit (p) pname;
inherit version;
hash = "sha256-yxiXBxBiPokequm+vjsHIoG9kQnRnbsOx3mYOd8nmiU=";
};
}))
libtorrent
file-read-backwards
brotli
human-readable
# requirements.txt
pillow
pyqt5
#pyqt5-sip
pyqtgraph
pyqtwebengine
]);
installPhase = ''
@ -71,8 +86,6 @@ stdenv.mkDerivation rec {
wrapPythonPrograms
cp -prvd ./* $out/
makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
--set QT_PLUGIN_PATH "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" \
--set _TRIBLERPATH "$out/src" \
--set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \
--set NO_AT_BRIDGE 1 \
@ -95,7 +108,7 @@ stdenv.mkDerivation rec {
description = "Decentralised P2P filesharing client based on the Bittorrent protocol";
homepage = "https://www.tribler.org/";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ xvapx viric ];
maintainers = with maintainers; [ xvapx viric mkg20001 ];
platforms = platforms.linux;
};
}

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "protonmail-bridge";
version = "3.6.1";
version = "3.7.1";
src = fetchFromGitHub {
owner = "ProtonMail";
repo = "proton-bridge";
rev = "v${version}";
hash = "sha256-1Dkw30WW7bCf89I+HUAvkfmlBbl+TcOVmAfBIFnTExE=";
hash = "sha256-KuXXXvuQhRQ0xKaw7tNO6HgQP7PsdxylDouwDQDDSJU=";
};
vendorHash = "sha256-1mBcYVmVLTFVyYU9QuJz1JoR0wAIREC0cCQZbHMdgZU=";
vendorHash = "sha256-QUJD7ICxaUClK82mKumyQVoINfWXSD64UfhZ4pu5dGU=";
nativeBuildInputs = [ pkg-config ];

View File

@ -14,13 +14,13 @@
stdenv.mkDerivation {
pname = "wdt";
version = "unstable-2023-07-11";
version = "unstable-2023-12-01";
src = fetchFromGitHub {
owner = "facebook";
repo = "wdt";
rev = "3b52ef573129fb799319630bd438717761111f57";
sha256 = "sha256-TwHWeTVzUo42t1erD7lMT4vdXiV3/9Hy1sPnrvJpQE8=";
rev = "66f17af009ef6eaf2707bb8bb511ba6bcf3d9bbe";
sha256 = "sha256-ucnFcpH9Duru35kRT769zMX2BMqufZJopd2srKPJkrU=";
};
nativeBuildInputs = [ cmake ];

View File

@ -11,6 +11,7 @@
, hamlib
, qtkeychain
, pkg-config
, cups
}:
stdenv.mkDerivation rec {
@ -27,6 +28,10 @@ stdenv.mkDerivation rec {
env.NIX_LDFLAGS = "-lhamlib";
patches = [
./mac.patch
];
buildInputs = [
qtbase
qtcharts
@ -35,7 +40,9 @@ stdenv.mkDerivation rec {
qtwebchannel
hamlib
qtkeychain
];
] ++ (lib.optionals stdenv.isDarwin [
cups
]);
nativeBuildInputs = [
wrapQtAppsHook

View File

@ -0,0 +1,32 @@
From 2b0ed30806b34315962da382cb41edf5f19b231e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= <mkg20001@gmail.com>
Date: Sat, 25 Nov 2023 14:22:24 +0100
Subject: [PATCH] Add installation to PREFIX on mac when set
This allows the app to be shipped in a non-bundeled version
We need this to ship the app on macOS with nix
---
QLog.pro | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/QLog.pro b/QLog.pro
index db6686f..576bfe1 100644
--- a/QLog.pro
+++ b/QLog.pro
@@ -386,6 +386,12 @@ macx: {
equals(QT_MAJOR_VERSION, 6): LIBS += -lqt6keychain
equals(QT_MAJOR_VERSION, 5): LIBS += -lqt5keychain
DISTFILES +=
+
+ # This allows the app to be shipped in a non-bundeled version
+ !isEmpty(PREFIX) {
+ target.path = $$PREFIX
+ INSTALLS += target
+ }
}
win32: {
--
2.42.0

View File

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "nvc";
version = "1.10.4";
version = "1.11.0";
src = fetchFromGitHub {
owner = "nickg";
repo = "nvc";
rev = "r${version}";
hash = "sha256-f4VjSBoJnsGb8MHKegJDlomPG32DuTgFcyv1w0GxKvA=";
hash = "sha256-95vIyBQ38SGpI+gnDqK1MRRzOT6uiYjDr1c//folqZ8=";
};
nativeBuildInputs = [

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "cvs-fast-export";
version = "1.61";
version = "1.62";
src = fetchurl {
url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz";
sha256 = "sha256-4iH8VKxVliVZKwZ40rGMb3fH1nxTBdMT5IcBzdp1mjw=";
sha256 = "sha256-ix0fg2wn2yStrgEhAxsSXvLu+C7sb2V5oyVCfhAe/R8=";
};
strictDeps = true;

View File

@ -2,13 +2,13 @@
stdenvNoCC.mkDerivation rec {
pname = "git-annex-remote-rclone";
version = "0.7";
version = "0.8";
src = fetchFromGitHub {
owner = "DanielDent";
repo = "git-annex-remote-rclone";
rev = "v${version}";
sha256 = "sha256-H2C4zjM+kbC9qPl1F+bSnepuqANjZd1sz6XxOTkVVkU=";
sha256 = "sha256-B6x67XXE4BHd3x7a8pQlqPPmpy0c62ziDAldB4QpqQ4=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "droidcam";
version = "2.0.0";
version = "2.1.0";
src = fetchFromGitHub {
owner = "aramg";
repo = "droidcam";
rev = "v${version}";
sha256 = "sha256-wTWdIPptbqt1cZgK6IDTZdrhno4Qlf4AujugfQ/xOT0=";
sha256 = "sha256-1VEaUm1194gF1/0zrK31SkI7POhi5eK6yYC0Cw/W4Ao=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,48 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
, makeWrapper
}:
buildNpmPackage rec {
pname = "redocly-cli";
version = "1.5.0";
src = fetchFromGitHub {
owner = "Redocly";
repo = "redocly-cli";
rev = "@redocly/cli@${version}";
hash = "sha256-Wi3IxPeNqD1s1Q0Pi9cCus6jCQM0noBTHIAp9HUSpZk=";
};
npmDepsHash = "sha256-BcjQ9z2i1YBt6lBqgkRcv29P/WZeuGjVSeVmekaFugM=";
npmBuildScript = "prepare";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
rm $out/lib/node_modules/@redocly/cli/node_modules/@redocly/{cli,openapi-core}
cp -R packages/cli $out/lib/node_modules/@redocly/cli/node_modules/@redocly/cli
cp -R packages/core $out/lib/node_modules/@redocly/cli/node_modules/@redocly/openapi-core
mkdir $out/bin
makeWrapper $out/lib/node_modules/@redocly/cli/node_modules/@redocly/cli/bin/cli.js $out/bin/redocly-cli --set REDOCLY_TELEMETRY off
'';
installCheckPhase = ''
runHook preInstallCheck
$out/bin/redocly-cli --version
runHook postInstallCheck
'';
doInstallCheck = true;
meta = {
description = "Redocly CLI makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more.";
homepage = "https://github.com/Redocly/redocly-cli";
license = lib.licenses.mit;
mainProgram = "redocly-cli";
maintainers = with lib.maintainers; [ szlend ];
};
}

View File

@ -11,18 +11,18 @@
buildGoModule rec {
pname = "usql";
version = "0.16.0";
version = "0.17.0";
src = fetchFromGitHub {
owner = "xo";
repo = "usql";
rev = "v${version}";
hash = "sha256-XfzCJOr0lOkimUKbOW0+qFNQMmYc0DBgi+0ItmEOjwE=";
hash = "sha256-AcxtIdPflMT2SGM2dgbbiFx5S+NlM7neMuXrIhysFPo=";
};
buildInputs = [ unixODBC icu ];
vendorHash = "sha256-sijt6YOp1pFNhaxLIOLH90Z5ODVbWFj/mp8Csx8n+ac=";
vendorHash = "sha256-UsYEhqsQUhRROe9HX4WIyi0OeMLHE87JOfp6vwbVMMo=";
proxyVendor = true;
# Exclude broken genji, hive & impala drivers (bad group)

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, meson
, ninja
@ -38,8 +39,12 @@ stdenv.mkDerivation rec {
};
patches = [
# See https://github.com/linuxmint/cinnamon-screensaver/issues/446#issuecomment-1819580053
./fix-broken-theming-with-pygobject-3-46.patch
# Fix broken theming with pygobject >= 3.46.0
# https://github.com/linuxmint/cinnamon-screensaver/issues/446
(fetchpatch {
url = "https://github.com/linuxmint/cinnamon-screensaver/commit/37ab8ed18f35591f2bd99043f12c06d98b4527db.patch";
hash = "sha256-4YSithosyTLy8OFu6DEhLT4c+EGEg84EenTKAiBiWo4=";
})
];
nativeBuildInputs = [

View File

@ -1,17 +0,0 @@
diff --git a/src/cinnamon-screensaver-main.py b/src/cinnamon-screensaver-main.py
index 05b727c..a185159 100755
--- a/src/cinnamon-screensaver-main.py
+++ b/src/cinnamon-screensaver-main.py
@@ -139,9 +139,9 @@ class Main(Gtk.Application):
fallback_prov = Gtk.CssProvider()
- if fallback_prov.load_from_data(fallback_css.encode()):
- Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default(), fallback_prov, 600)
- Gtk.StyleContext.reset_widgets(Gdk.Screen.get_default())
+ fallback_prov.load_from_data(fallback_css.encode())
+ Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default(), fallback_prov, 600)
+ Gtk.StyleContext.reset_widgets(Gdk.Screen.get_default())
if __name__ == "__main__":
setproctitle.setproctitle('cinnamon-screensaver')

View File

@ -19,13 +19,13 @@
stdenv.mkDerivation rec {
pname = "deepin-terminal";
version = "6.0.8";
version = "6.0.9";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-7Yyw4aw+44JX9SKuwmJSrLz04WETvs3E3cnt0/O+Ls0=";
hash = "sha256-QdODR4zmbMuzSVy6eJhwJHNPXkAn6oCLHq+YZEOmtIU=";
};
cmakeFlags = [ "-DVERSION=${version}" ];

View File

@ -0,0 +1,137 @@
{ lib, stdenv, llvm_meta
, monorepoSrc, runCommand
, cmake, ninja, libxml2, libllvm, version, python3
, buildLlvmTools
, fixDarwinDylibNames
, enableManpages ? false
}:
let
self = stdenv.mkDerivation (rec {
pname = "clang";
inherit version;
src = runCommand "${pname}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
cp -r ${monorepoSrc}/clang-tools-extra "$out"
'';
sourceRoot = "${src.name}/${pname}";
nativeBuildInputs = [ cmake ninja python3 ]
++ lib.optional enableManpages python3.pkgs.sphinx
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
"-DLLVM_INCLUDE_TESTS=OFF"
] ++ lib.optionals enableManpages [
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
# Added in LLVM15:
# `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
# `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
"-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
"-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
];
patches = [
./purity.patch
# https://reviews.llvm.org/D51899
./gnu-install-dirs.patch
../../common/clang/add-nostdlibinc-flag.patch
# FIMXE: do we need this patch?
# (substituteAll {
# src = ../../clang-11-12-LLVMgold-path.patch;
# libllvmLibdir = "${libllvm.lib}/lib";
# })
];
postPatch = ''
(cd tools && ln -s ../../clang-tools-extra extra)
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
'';
outputs = [ "out" "lib" "dev" "python" ];
postInstall = ''
ln -sv $out/bin/clang $out/bin/cpp
mkdir -p $lib/lib/clang
mv $lib/lib/17 $lib/lib/clang/17
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
moveToOutput "lib/libclang-cpp.*" "$lib"
substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
mv $out/bin/set-xcode-analyzer $python/bin
fi
mv $out/share/clang/*.py $python/share/clang
rm $out/bin/c-index-test
patchShebangs $python/bin
mkdir -p $dev/bin
cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
'';
passthru = {
inherit libllvm;
isClang = true;
hardeningUnsupportedFlags = [ "fortify3" ];
};
meta = llvm_meta // {
homepage = "https://clang.llvm.org/";
description = "A C language family frontend for LLVM";
longDescription = ''
The Clang project provides a language front-end and tooling
infrastructure for languages in the C language family (C, C++, Objective
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
It aims to deliver amazingly fast compiles, extremely useful error and
warning messages and to provide a platform for building great source
level tools. The Clang Static Analyzer and clang-tidy are tools that
automatically find bugs in your code, and are great examples of the sort
of tools that can be built using the Clang frontend as a library to
parse C/C++ code.
'';
mainProgram = "clang";
};
} // lib.optionalAttrs enableManpages {
pname = "clang-manpages";
ninjaFlags = [ "docs-clang-man" ];
installPhase = ''
mkdir -p $out/share/man/man1
# Manually install clang manpage
cp docs/man/*.1 $out/share/man/man1/
'';
outputs = [ "out" ];
doCheck = false;
meta = llvm_meta // {
description = "man page for Clang ${version}";
};
});
in self

View File

@ -0,0 +1,98 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7936d72e088..a362fa49b534 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,21 @@ if(CLANG_BUILT_STANDALONE)
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
- # Turn into CACHE PATHs for overwritting
+ # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
+ # LLVM_CONFIG.
+ if (NOT LLVM_CONFIG_FOUND)
+ # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
+ # path is removed.
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
+ set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
+ # N.B. this is just a default value, the CACHE PATHs below can be overriden.
+ set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+ set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
+ set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
+ else()
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
+ endif()
+
set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index 75b0080f6715..c895b884cd27 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -119,8 +119,8 @@ macro(add_clang_library name)
install(TARGETS ${lib}
COMPONENT ${lib}
${export_to_clangtargets}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
if (NOT LLVM_ENABLE_IDE)
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
index f2b0c5cddcbb..52f37fc368ce 100644
--- a/lib/Headers/CMakeLists.txt
+++ b/lib/Headers/CMakeLists.txt
@@ -473,6 +473,7 @@ add_header_target("windows-resource-headers" ${windows_only_files})
add_header_target("utility-resource-headers" ${utility_files})
get_clang_resource_dir(header_install_dir SUBDIR include)
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${CLANG_VERSION_MAJOR}/include)
#############################################################
# Install rules for the catch-all clang-resource-headers target
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index 4f23065a2472..6a0f55991e24 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
COMPONENT
libclang-python-bindings
DESTINATION
- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
endforeach()
if(NOT LLVM_ENABLE_IDE)
add_custom_target(libclang-python-bindings)
diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
index 3aca22c0b0a8..3115353e3fe3 100644
--- a/tools/scan-build-py/CMakeLists.txt
+++ b/tools/scan-build-py/CMakeLists.txt
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
install(FILES lib/libscanbuild/${lib}
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
COMPONENT scan-build-py)
endforeach()
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
install(FILES lib/libscanbuild/resources/${resource}
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
COMPONENT scan-build-py)
endforeach()
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
install(FILES lib/libear/${lib}
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
COMPONENT scan-build-py)
endforeach()

View File

@ -0,0 +1,29 @@
From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Thu, 18 May 2017 11:56:12 -0500
Subject: [PATCH] "purity" patch for 5.0
---
lib/Driver/ToolChains/Gnu.cpp | 7 -------
1 file changed, 7 deletions(-)
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index fe3c0191bb..c6a482bece 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
} else {
if (Args.hasArg(options::OPT_rdynamic))
CmdArgs.push_back("-export-dynamic");
- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE &&
- !Args.hasArg(options::OPT_r)) {
- CmdArgs.push_back("-dynamic-linker");
- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
- ToolChain.getDynamicLinker(Args)));
- }
}
CmdArgs.push_back("-o");
--
2.11.0

View File

@ -0,0 +1,21 @@
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index 3a66dd9c3fb..7efc85d9f9f 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -348,4 +348,8 @@ if (NOT MSVC)
+ set(i486_SOURCES ${i386_SOURCES})
+ set(i586_SOURCES ${i386_SOURCES})
+ set(i686_SOURCES ${i386_SOURCES})
+
if (WIN32)
set(i386_SOURCES
${i386_SOURCES}
@@ -723,6 +723,7 @@ else ()
endif()
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
+ message("arch: ${arch}")
if (CAN_TARGET_${arch})
# For ARM archs, exclude any VFP builtins if VFP is not supported
if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")

View File

@ -0,0 +1,71 @@
diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
--- a/lib/sanitizer_common/sanitizer_mac.cpp
+++ b/lib/sanitizer_common/sanitizer_mac.cpp
@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
// Offset example:
// XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
constexpr u16 GetOSMajorKernelOffset() {
- if (TARGET_OS_OSX) return 4;
- if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
- if (TARGET_OS_WATCH) return 13;
+#if TARGET_OS_OSX
+ return 4;
+#endif
+#if TARGET_OS_IOS || TARGET_OS_TV
+ return 6;
+#endif
+#if TARGET_OS_WATCH
+ return 13;
+#endif
}
using VersStr = char[64];
@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
u16 os_major = kernel_major - offset;
const char *format = "%d.0";
- if (TARGET_OS_OSX) {
- if (os_major >= 16) { // macOS 11+
- os_major -= 5;
- } else { // macOS 10.15 and below
- format = "10.%d";
- }
+#if TARGET_OS_OSX
+ if (os_major >= 16) { // macOS 11+
+ os_major -= 5;
+ } else { // macOS 10.15 and below
+ format = "10.%d";
}
+#endif
return internal_snprintf(vers, sizeof(VersStr), format, os_major);
}
@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
// Aligned versions example:
// macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
static void MapToMacos(u16 *major, u16 *minor) {
- if (TARGET_OS_OSX)
- return;
-
- if (TARGET_OS_IOS || TARGET_OS_TV)
+#if !TARGET_OS_OSX
+#if TARGET_OS_IOS || TARGET_OS_TV
*major += 2;
- else if (TARGET_OS_WATCH)
+#elif TARGET_OS_WATCH
*major += 9;
- else
+#else
UNREACHABLE("unsupported platform");
+#endif
if (*major >= 16) { // macOS 11+
*major -= 5;
@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
*minor = *major;
*major = 10;
}
+#endif
}
static MacosVersion GetMacosAlignedVersionInternal() {

View File

@ -0,0 +1,154 @@
{ lib, stdenv, llvm_meta, version
, monorepoSrc, runCommand
, cmake, ninja, python3, xcbuild, libllvm, libcxxabi, libxcrypt
, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
}:
let
useLLVM = stdenv.hostPlatform.useLLVM or false;
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
haveLibc = stdenv.cc.libc != null;
isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic;
inherit (stdenv.hostPlatform) isMusl;
baseName = "compiler-rt";
src = runCommand "${baseName}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${baseName} "$out"
'';
in
stdenv.mkDerivation {
pname = baseName + lib.optionalString (haveLibc) "-libc";
inherit version;
inherit src;
sourceRoot = "${src.name}/${baseName}";
nativeBuildInputs = [ cmake ninja python3 libllvm.dev ]
++ lib.optional stdenv.isDarwin xcbuild.xcrun;
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
env.NIX_CFLAGS_COMPILE = toString ([
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
] ++ lib.optionals (!haveLibc) [
# The compiler got stricter about this, and there is a usellvm patch below
# which patches out the assert include causing an implicit definition of
# assert. It would be nicer to understand why compiler-rt thinks it should
# be able to #include <assert.h> in the first place; perhaps it's in the
# wrong, or perhaps there is a way to provide an assert.h.
"-Wno-error=implicit-function-declaration"
]);
cmakeFlags = [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isDarwinStatic) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal || isDarwinStatic ) [
"-DCMAKE_CXX_COMPILER_WORKS=ON"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
] ++ lib.optionals (useLLVM && !haveLibc) [
"-DCMAKE_C_FLAGS=-nodefaultlibs"
] ++ lib.optionals (useLLVM) [
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
#https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
] ++ lib.optionals (bareMetal) [
"-DCOMPILER_RT_OS_DIR=baremetal"
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
"-DCMAKE_LIPO=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo"
"-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
"-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
# `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
# https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
"-DCOMPILER_RT_ENABLE_IOS=OFF"
];
outputs = [ "out" "dev" ];
patches = [
./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
./gnu-install-dirs.patch
# ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
# extra `/`.
./normalize-var.patch
# Prevent a compilation error on darwin
./darwin-targetconditionals.patch
# See: https://github.com/NixOS/nixpkgs/pull/186575
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
# See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
# ../../common/compiler-rt/armv7l-15.patch
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + lib.optionalString (useLLVM && !haveLibc) ''
substituteInPlace lib/builtins/int_util.c \
--replace "#include <stdlib.h>" ""
substituteInPlace lib/builtins/clear_cache.c \
--replace "#include <assert.h>" ""
substituteInPlace lib/builtins/cpu_model.c \
--replace "#include <assert.h>" ""
'';
# Hack around weird upsream RPATH bug
postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
ln -s "$out/lib"/*/* "$out/lib"
'' + lib.optionalString (useLLVM && stdenv.hostPlatform.isLinux) ''
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
# Note the history of crt{begin,end}S in previous versions of llvm in nixpkg:
# The presence of crtbegin_shared has been added and removed; it's possible
# people have added/removed it to get it working on their platforms.
# Try each in turn for now.
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.o
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
'' + lib.optionalString doFakeLibgcc ''
ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
'';
meta = llvm_meta // {
homepage = "https://compiler-rt.llvm.org/";
description = "Compiler runtime libraries";
longDescription = ''
The compiler-rt project provides highly tuned implementations of the
low-level code generator support routines like "__fixunsdfdi" and other
calls generated when a target doesn't have a short sequence of native
instructions to implement a core IR operation. It also provides
implementations of run-time libraries for dynamic testing tools such as
AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
'';
# "All of the code in the compiler-rt project is dual licensed under the MIT
# license and the UIUC License (a BSD-like license)":
license = with lib.licenses; [ mit ncsa ];
};
}

View File

@ -0,0 +1,20 @@
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 8a6219568b3f..30ee68a47ccf 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -100,13 +100,13 @@ endif()
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
${COMPILER_RT_OUTPUT_DIR}/lib)
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt libraries should be installed.")
else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt libraries should be installed.")
endif()

View File

@ -0,0 +1,16 @@
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index 4c85551d7766..297d7a47c54b 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/cmake/Modules/CompilerRTUtils.cmake
@@ -328,8 +328,9 @@ macro(load_llvm_config)
endif()
endif()
- set(LLVM_LIBRARY_OUTPUT_INTDIR
- ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+ get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
+ ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
+ REALPATH)
set(LLVM_MAIN_SRC_DIR "${LLVM_MAIN_SRC_DIR_DEFAULT}" CACHE PATH "Path to LLVM source tree")
message(STATUS "LLVM_MAIN_SRC_DIR: \"${LLVM_MAIN_SRC_DIR}\"")

View File

@ -0,0 +1,358 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
, preLibcCrossHeaders
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
, targetLlvm
# This is the default binutils, but with *this* version of LLD rather
# than the default LLVM verion's, if LLD is the choice. We use these for
# the `useLLVM` bootstrapping below.
, bootBintoolsNoLibc ?
if stdenv.targetPlatform.linker == "lld"
then null
else pkgs.bintoolsNoLibc
, bootBintools ?
if stdenv.targetPlatform.linker == "lld"
then null
else pkgs.bintools
, darwin
# LLVM release information; specify one of these but not both:
, gitRelease ? null
# i.e.:
# {
# version = /* i.e. "15.0.0" */;
# rev = /* commit SHA */;
# rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
# }
, officialRelease ? { version = "17.0.2"; sha256 = "08w6mksm7mkws3hhhsy5gg881b4whr6abrshmh6q4c32qlni94nn"; }
# i.e.:
# {
# version = /* i.e. "15.0.0" */;
# candidate = /* optional; if specified, should be: "rcN" */
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
# }
# By default, we'll try to fetch a release from `github:llvm/llvm-project`
# corresponding to the `gitRelease` or `officialRelease` specified.
#
# You can provide your own LLVM source by specifying this arg but then it's up
# to you to make sure that the LLVM repo given matches the release configuration
# specified.
, monorepoSrc ? null
}:
assert let
int = a: if a then 1 else 0;
xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
in
lib.assertMsg
(xor
(gitRelease != null)
(officialRelease != null))
("must specify `gitRelease` or `officialRelease`" +
(lib.optionalString (gitRelease != null) " not both"));
let
monorepoSrc' = monorepoSrc;
in let
inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
inherit (releaseInfo) release_version version;
inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
tools = lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
major = lib.versions.major release_version;
mkExtraBuildCommands0 = cc: ''
rsrc="$out/resource-root"
mkdir "$rsrc"
ln -s "${cc.lib}/lib/clang/${major}/include" "$rsrc"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
'';
mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
'';
bintoolsNoLibc' =
if bootBintoolsNoLibc == null
then tools.bintoolsNoLibc
else bootBintoolsNoLibc;
bintools' =
if bootBintools == null
then tools.bintools
else bootBintools;
in {
libllvm = callPackage ./llvm {
inherit llvm_meta;
};
# `llvm` historically had the binaries. When choosing an output explicitly,
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
llvm = tools.libllvm;
libclang = callPackage ./clang {
inherit llvm_meta;
};
clang-unwrapped = tools.libclang;
llvm-manpages = lowPrio (tools.libllvm.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
clang-manpages = lowPrio (tools.libclang.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
lldb-manpages = lowPrio (tools.lldb.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;
libstdcxxClang = wrapCCWith rec {
cc = tools.clang-unwrapped;
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
libcxx = null;
extraPackages = [
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = mkExtraBuildCommands cc;
};
libcxxClang = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = targetLlvmLibraries.libcxx;
extraPackages = [
libcxx.cxxabi
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = mkExtraBuildCommands cc;
};
lld = callPackage ./lld {
inherit llvm_meta;
};
lldb = callPackage ../common/lldb.nix {
src = callPackage ({ runCommand }: runCommand "lldb-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/lldb "$out"
'') { };
patches =
[
# FIXME: do we need this? ./procfs.patch
./lldb/gnu-install-dirs.patch
]
# This is a stopgap solution if/until the macOS SDK used for x86_64 is
# updated.
#
# The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
# header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
# of this preprocessor symbol in `lldb` with its expansion.
#
# See here for some context:
# https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
++ lib.optional (
stdenv.targetPlatform.isDarwin
&& !stdenv.targetPlatform.isAarch64
&& (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
) ./lldb/cpu_subtype_arm64e_replacement.patch;
inherit llvm_meta;
};
# Below, is the LLVM bootstrapping logic. It handles building a
# fully LLVM toolchain from scratch. No GCC toolchain should be
# pulled in. As a consequence, it is very quick to build different
# targets provided by LLVM and we can also build for what GCC
# doesnt support like LLVM. Probably we should move to some other
# file.
bintools-unwrapped = callPackage ../common/bintools.nix { };
bintoolsNoLibc = wrapBintoolsWith {
bintools = tools.bintools-unwrapped;
libc = preLibcCrossHeaders;
};
bintools = wrapBintoolsWith {
bintools = tools.bintools-unwrapped;
};
clangUseLLVM = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = targetLlvmLibraries.libcxx;
bintools = bintools';
extraPackages = [
libcxx.cxxabi
targetLlvmLibraries.compiler-rt
] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
targetLlvmLibraries.libunwind
];
extraBuildCommands = mkExtraBuildCommands cc;
nixSupport.cc-cflags =
[ "-rtlib=compiler-rt"
"-Wno-unused-command-line-argument"
"-B${targetLlvmLibraries.compiler-rt}/lib"
]
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
++ lib.optional
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
"-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
};
clangNoLibcxx = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = bintools';
extraPackages = [
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = mkExtraBuildCommands cc;
nixSupport.cc-cflags =
[
"-rtlib=compiler-rt"
"-B${targetLlvmLibraries.compiler-rt}/lib"
"-nostdlib++"
]
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
};
clangNoLibc = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = bintoolsNoLibc';
extraPackages = [
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = mkExtraBuildCommands cc;
nixSupport.cc-cflags =
[
"-rtlib=compiler-rt"
"-B${targetLlvmLibraries.compiler-rt}/lib"
]
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
};
clangNoCompilerRt = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = bintoolsNoLibc';
extraPackages = [ ];
extraBuildCommands = mkExtraBuildCommands0 cc;
nixSupport.cc-cflags =
[
"-nostartfiles"
]
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
};
clangNoCompilerRtWithLibc = wrapCCWith (rec {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = bintools';
extraPackages = [ ];
extraBuildCommands = mkExtraBuildCommands0 cc;
} // lib.optionalAttrs stdenv.targetPlatform.isWasm {
nixSupport.cc-cflags = [ "-fno-exceptions" ];
});
});
libraries = lib.makeExtensible (libraries: let
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc; });
in {
compiler-rt-libc = callPackage ./compiler-rt {
inherit llvm_meta;
stdenv = if stdenv.hostPlatform.useLLVM or false || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic)
then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
else stdenv;
};
compiler-rt-no-libc = callPackage ./compiler-rt {
inherit llvm_meta;
stdenv = if stdenv.hostPlatform.useLLVM or false
then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
else stdenv;
};
# N.B. condition is safe because without useLLVM both are the same.
compiler-rt = if stdenv.hostPlatform.isAndroid || stdenv.hostPlatform.isDarwin
then libraries.compiler-rt-libc
else libraries.compiler-rt-no-libc;
stdenv = overrideCC stdenv buildLlvmTools.clang;
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
libcxxabi = let
# CMake will "require" a compiler capable of compiling C++ programs
# cxx-header's build does not actually use one so it doesn't really matter
# what stdenv we use here, as long as CMake is happy.
cxx-headers = callPackage ./libcxx {
inherit llvm_meta;
# Note that if we use the regular stdenv here we'll get cycle errors
# when attempting to use this compiler in the stdenv.
#
# The final stdenv pulls `cxx-headers` from the package set where
# hostPlatform *is* the target platform which means that `stdenv` at
# that point attempts to use this toolchain.
#
# So, we use `stdenv_` (the stdenv containing `clang` from this package
# set, defined below) to sidestep this issue.
#
# Because we only use `cxx-headers` in `libcxxabi` (which depends on the
# clang stdenv _anyways_), this is okay.
stdenv = stdenv_;
headersOnly = true;
};
# `libcxxabi` *doesn't* need a compiler with a working C++ stdlib but it
# *does* need a relatively modern C++ compiler (see:
# https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support).
#
# So, we use the clang from this LLVM package set, like libc++
# "boostrapping builds" do:
# https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build
#
# We cannot use `clangNoLibcxx` because that contains `compiler-rt` which,
# on macOS, depends on `libcxxabi`, thus forming a cycle.
stdenv_ = overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc;
in callPackage ./libcxxabi {
stdenv = stdenv_;
inherit llvm_meta cxx-headers;
};
# Like `libcxxabi` above, `libcxx` requires a fairly modern C++ compiler,
# so: we use the clang from this LLVM package set instead of the regular
# stdenv's compiler.
libcxx = callPackage ./libcxx {
inherit llvm_meta;
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};
libunwind = callPackage ./libunwind {
inherit llvm_meta;
stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
};
openmp = callPackage ./openmp {
inherit llvm_meta targetLlvm;
};
});
noExtend = extensible: lib.attrsets.removeAttrs extensible [ "extend" ];
in { inherit tools libraries release_version; } // (noExtend libraries) // (noExtend tools)

View File

@ -0,0 +1,114 @@
{ lib, stdenv, llvm_meta
, monorepoSrc, runCommand
, cmake, ninja, python3, fixDarwinDylibNames, version
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
, libcxxabi, libcxxrt, libunwind
, enableShared ? !stdenv.hostPlatform.isStatic
# If headersOnly is true, the resulting package would only include the headers.
# Use this to break the circular dependency between libcxx and libcxxabi.
#
# Some context:
# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
, headersOnly ? false
}:
let
basename = "libcxx";
in
assert stdenv.isDarwin -> cxxabi.libName == "c++abi";
stdenv.mkDerivation rec {
pname = basename + lib.optionalString headersOnly "-headers";
inherit version;
src = runCommand "${pname}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${basename} "$out"
mkdir -p "$out/libcxxabi"
cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi"
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/third-party "$out"
cp -r ${monorepoSrc}/runtimes "$out"
'';
sourceRoot = "${src.name}/runtimes";
outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
prePatch = ''
cd ../${basename}
chmod -R u+w .
'';
postPatch = ''
cd ../runtimes
'';
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py
'';
nativeBuildInputs = [ cmake ninja python3 ]
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs =
lib.optionals (!headersOnly) [ cxxabi ]
++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [ libunwind ];
cmakeFlags = let
# See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
libcxx_cxx_abi_opt = {
"c++abi" = "system-libcxxabi";
"cxxrt" = "libcxxrt";
}.${cxxabi.libName} or (throw "unknown cxxabi: ${cxxabi.libName} (${cxxabi.pname})");
in [
"-DLLVM_ENABLE_RUNTIMES=libcxx"
"-DLIBCXX_CXX_ABI=${if headersOnly then "none" else libcxx_cxx_abi_opt}"
] ++ lib.optional (!headersOnly && cxxabi.libName == "c++abi") "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi.dev}/include/c++/v1"
++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DLIBCXX_USE_COMPILER_RT=ON"
# There's precedent for this in llvm-project/libcxx/cmake/caches.
# In a monorepo build you might do the following in the libcxxabi build:
# -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwinder
# -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
# libcxx appears to require unwind and doesn't pull it in via other means.
"-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
] ++ lib.optionals stdenv.hostPlatform.isWasm [
"-DLIBCXX_ENABLE_THREADS=OFF"
"-DLIBCXX_ENABLE_FILESYSTEM=OFF"
"-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
"-DUNIX=ON" # Required otherwise libc++ fails to detect the correct linker
] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"
# If we're only building the headers we don't actually *need* a functioning
# C/C++ compiler:
++ lib.optionals (headersOnly) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
];
ninjaFlags = lib.optional headersOnly "generate-cxx-headers";
installTargets = lib.optional headersOnly "install-cxx-headers";
passthru = {
isLLVM = true;
inherit cxxabi;
};
meta = llvm_meta // {
homepage = "https://libcxx.llvm.org/";
description = "C++ standard library";
longDescription = ''
libc++ is an implementation of the C++ standard library, targeting C++11,
C++14 and above.
'';
# "All of the code in libc++ is dual licensed under the MIT license and the
# UIUC License (a BSD-like license)":
license = with lib.licenses; [ mit ncsa ];
};
}

View File

@ -0,0 +1,117 @@
{ lib, stdenv, llvm_meta, cmake, ninja, python3
, monorepoSrc, runCommand, fetchpatch
, cxx-headers, libunwind, version
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libcxxabi";
inherit version;
src = runCommand "${pname}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
mkdir -p "$out/libcxx/src"
cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
cp -r ${monorepoSrc}/libcxx/include "$out/libcxx"
cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/runtimes "$out"
'';
sourceRoot = "${src.name}/runtimes";
outputs = [ "out" "dev" ];
postUnpack = lib.optionalString stdenv.isDarwin ''
export TRIPLE=x86_64-apple-darwin
'';
prePatch = ''
cd ../${pname}
chmod -R u+w .
'';
patches = [
./gnu-install-dirs.patch
# https://reviews.llvm.org/D132298, Allow building libcxxabi alone
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/e6a0800532bb409f6d1c62f3698bdd6994a877dc.patch";
sha256 = "1xyjd56m4pfwq8p3xh6i8lhkk9kq15jaml7qbhxdf87z4jjkk63a";
stripLen = 1;
})
];
postPatch = ''
cd ../runtimes
'';
nativeBuildInputs = [ cmake ninja python3 ];
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libcxxabi"
"-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
# `libcxxabi`'s build does not need a toolchain with a c++ stdlib attached
# (we specify the headers it should use explicitly above).
#
# CMake however checks for this anyways; this flag tells it not to. See:
# https://github.com/llvm/llvm-project/blob/4bd3f3759259548e159aeba5c76efb9a0864e6fa/llvm/runtimes/CMakeLists.txt#L243
"-DCMAKE_CXX_COMPILER_WORKS=ON"
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
# libcxxabi's CMake looks as though it treats -nostdlib++ as implying -nostdlib,
# but that does not appear to be the case for example when building
# pkgsLLVM.libcxxabi (which uses clangNoCompilerRtWithLibc).
"-DCMAKE_EXE_LINKER_FLAGS=-nostdlib"
"-DCMAKE_SHARED_LINKER_FLAGS=-nostdlib"
] ++ lib.optionals stdenv.hostPlatform.isWasm [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
"-DLIBCXXABI_ENABLE_THREADS=OFF"
"-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
"-DUNIX=ON"
] ++ lib.optionals (!enableShared) [
"-DLIBCXXABI_ENABLE_SHARED=OFF"
];
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
install_name_tool -id $out/$file $file
done
'';
postInstall = ''
mkdir -p "$dev/include"
install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
'';
passthru = {
libName = "c++abi";
};
meta = llvm_meta // {
homepage = "https://libcxxabi.llvm.org/";
description = "Provides C++ standard library support";
longDescription = ''
libc++abi is a new implementation of low level support for a standard C++ library.
'';
# "All of the code in libc++abi is dual licensed under the MIT license and
# the UIUC License (a BSD-like license)":
license = with lib.licenses; [ mit ncsa ];
maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
# Broken until https://github.com/llvm/llvm-project/issues/64226 is resolved
# We should check if the version is not 10.13 but that is currently broken.
broken = stdenv.isDarwin && stdenv.isx86_64;
};
}

View File

@ -0,0 +1,22 @@
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index f380fe6b6b92..a9656258c38e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,7 +188,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libc++abi libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
@@ -202,7 +202,7 @@ else()
set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
endif()
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++abi libraries should be installed.")
endif()

View File

@ -0,0 +1,63 @@
{ lib, stdenv, llvm_meta, version
, monorepoSrc, runCommand
, cmake
, ninja
, python3
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
# I am not so comfortable giving libc++ and friends the whole monorepo as
# requested, so I filter it to what is needed.
src = runCommand "${pname}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
mkdir -p "$out/libcxx"
cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx"
cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/runtimes "$out"
'';
sourceRoot = "${src.name}/runtimes";
prePatch = ''
cd ../${pname}
chmod -R u+w .
'';
postPatch = ''
cd ../runtimes
'';
postInstall = lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin) ''
# libcxxabi wants to link to libunwind_shared.so (?).
ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake ninja python3 ];
cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libunwind"
] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
meta = llvm_meta // {
# Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
description = "LLVM's unwinder library";
longDescription = ''
The unwind library provides a family of _Unwind_* functions implementing
the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
I). It is a dependency of the C++ ABI library, and sometimes is a
dependency of other runtimes.
'';
};
}

View File

@ -0,0 +1,57 @@
{ lib, stdenv, llvm_meta
, buildLlvmTools
, monorepoSrc, runCommand
, cmake
, ninja
, libxml2
, libllvm
, version
}:
stdenv.mkDerivation rec {
pname = "lld";
inherit version;
# Blank llvm dir just so relative path works
src = runCommand "${pname}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
mkdir -p "$out/libunwind"
cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
mkdir -p "$out/llvm"
'';
sourceRoot = "${src.name}/${pname}";
patches = [
./gnu-install-dirs.patch
];
nativeBuildInputs = [ cmake ninja ];
buildInputs = [ libllvm libxml2 ];
cmakeFlags = [
"-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
];
# Musl's default stack size is too small for lld to be able to link Firefox.
LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
outputs = [ "out" "lib" "dev" ];
meta = llvm_meta // {
homepage = "https://lld.llvm.org/";
description = "The LLVM linker (unwrapped)";
longDescription = ''
LLD is a linker from the LLVM project that is a drop-in replacement for
system linkers and runs much faster than them. It also provides features
that are useful for toolchain developers.
The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
WebAssembly in descending order of completeness. Internally, LLD consists
of several different linkers.
'';
};
}

View File

@ -0,0 +1,46 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d6225646fe6..9b5d0b15af13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE)
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
- # Turn into CACHE PATHs for overwriting
- set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
- set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
- set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
+ # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
+ # LLVM_CONFIG.
+ if (NOT LLVM_CONFIG_FOUND)
+ # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
+ # path is removed.
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
+ set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
+ # N.B. this is just a default value, the CACHE PATHs below can be overridden.
+ set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+ else()
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
+ endif()
+
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
+ set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
+ set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
index d3924f7243d4..42a7cd62281c 100644
--- a/cmake/modules/AddLLD.cmake
+++ b/cmake/modules/AddLLD.cmake
@@ -18,8 +18,8 @@ macro(add_lld_library name)
install(TARGETS ${name}
COMPONENT ${name}
${export_to_lldtargets}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)

View File

@ -0,0 +1,12 @@
diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
len = sizeof(is_64_bit_capable);
::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
- if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
+ if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
// The arm64e architecture is a preview. Pretend the host architecture
// is arm64.
cpusubtype = CPU_SUBTYPE_ARM64_ALL;

View File

@ -0,0 +1,23 @@
diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
index 3291a7c808e1..b27d27ce6a87 100644
--- a/cmake/modules/AddLLDB.cmake
+++ b/cmake/modules/AddLLDB.cmake
@@ -109,7 +109,7 @@ function(add_lldb_library name)
endif()
if(PARAM_SHARED)
- set(install_dest lib${LLVM_LIBDIR_SUFFIX})
+ set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(PARAM_INSTALL_PREFIX)
set(install_dest ${PARAM_INSTALL_PREFIX})
endif()
diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
index 7d48491ec89a..c04543585588 100644
--- a/tools/intel-features/CMakeLists.txt
+++ b/tools/intel-features/CMakeLists.txt
@@ -30,4 +30,4 @@ add_lldb_library(lldbIntelFeatures SHARED
)
install(TARGETS lldbIntelFeatures
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})

View File

@ -0,0 +1,46 @@
--- a/source/Plugins/Process/Linux/Procfs.h
+++ b/source/Plugins/Process/Linux/Procfs.h
@@ -10,6 +10,13 @@
// sys/procfs.h on Android/Linux for all supported architectures.
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
+
+// on i686 preprocessor symbols with these register names are defined as
+// numeric constants; these symbols clash with identifier names used in
+// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
+#undef FS
+#undef CS
#include "lldb/lldb-types.h"
@@ -17,23 +24,13 @@
#include <vector>
-#ifdef __ANDROID__
-#if defined(__arm64__) || defined(__aarch64__)
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t
- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
-typedef struct user_fpsimd_state elf_fpregset_t;
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#elif defined(__mips__)
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#endif
-#else // __ANDROID__
+#if !defined(__GLIBC__) && defined(__powerpc__)
+#define pt_regs musl_pt_regs
+#include <sys/procfs.h>
+#undef pt_regs
+#else
#include <sys/procfs.h>
-#endif // __ANDROID__
+#endif
namespace lldb_private {
namespace process_linux {

View File

@ -0,0 +1,427 @@
{ lib, stdenv, llvm_meta
, pkgsBuildBuild
, monorepoSrc
, runCommand
, cmake
, darwin
, ninja
, python3
, python3Packages
, libffi
# TODO: Gold plugin on LLVM16 has a severe memory corruption bug: https://github.com/llvm/llvm-project/issues/61350.
, enableGoldPlugin ? false
, libbfd
, libpfm
, libxml2
, ncurses
, version
, release_version
, zlib
, which
, sysctl
, buildLlvmTools
, debugVersion ? false
, doCheck ? (!stdenv.isx86_32 /* TODO: why */) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
# broken for the armv7l builder
&& !stdenv.hostPlatform.isAarch
, enablePolly ? true
}:
let
inherit (lib) optional optionals optionalString;
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
# Note that we _explicitly_ ask for a python interpreter for our host
# platform here; the splicing that would ordinarily take care of this for
# us does not seem to work once we use `withPackages`.
let
checkDeps = ps: with ps; [ psutil ];
in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
else python3;
in
assert (lib.assertMsg (!enableGoldPlugin) "Gold plugin cannot be enabled on LLVM16 due to a upstream issue: https://github.com/llvm/llvm-project/issues/61350");
stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
src = runCommand "${pname}-src-${version}" {} (''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
cp -r ${monorepoSrc}/third-party "$out"
'' + lib.optionalString enablePolly ''
chmod u+w "$out/${pname}/tools"
cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
'');
sourceRoot = "${src.name}/${pname}";
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake ninja python ]
++ optionals enableManpages [
# Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
# splicing does *not* work with the latter. (TODO: fix)
python3Packages.sphinx python3Packages.recommonmark
];
buildInputs = [ libxml2 libffi ]
++ optional enablePFM libpfm; # exegesis
propagatedBuildInputs = [ ncurses zlib ];
nativeCheckInputs = [
which
] ++ lib.optional stdenv.isDarwin sysctl;
patches = [
./gnu-install-dirs.patch
# Running the tests involves invoking binaries (like `opt`) that depend on
# the LLVM dylibs and reference them by absolute install path (i.e. their
# nix store path).
#
# Because we have not yet run the install phase (we're running these tests
# as part of `checkPhase` instead of `installCheckPhase`) these absolute
# paths do not exist yet; to work around this we point the loader (`ld` on
# unix, `dyld` on macOS) at the `lib` directory which will later become this
# package's `lib` output.
#
# Previously we would just set `LD_LIBRARY_PATH` to include the build `lib`
# dir but:
# - this doesn't generalize well to other platforms; `lit` doesn't forward
# `DYLD_LIBRARY_PATH` (macOS):
# + https://github.com/llvm/llvm-project/blob/0d89963df354ee309c15f67dc47c8ab3cb5d0fb2/llvm/utils/lit/lit/TestingConfig.py#L26
# - even if `lit` forwarded this env var, we actually cannot set
# `DYLD_LIBRARY_PATH` in the child processes `lit` launches because
# `DYLD_LIBRARY_PATH` (and `DYLD_FALLBACK_LIBRARY_PATH`) is cleared for
# "protected processes" (i.e. the python interpreter that runs `lit`):
# https://stackoverflow.com/a/35570229
# - other LLVM subprojects deal with this issue by having their `lit`
# configuration set these env vars for us; it makes sense to do the same
# for LLVM:
# + https://github.com/llvm/llvm-project/blob/4c106cfdf7cf7eec861ad3983a3dd9a9e8f3a8ae/clang-tools-extra/test/Unit/lit.cfg.py#L22-L31
#
# !!! TODO: look into upstreaming this patch
./llvm-lit-cfg-add-libs-to-dylib-path.patch
# `lit` has a mode where it executes run lines as a shell script which is
# constructs; this is problematic for macOS because it means that there's
# another process in between `lit` and the binaries being tested. As noted
# above, this means that `DYLD_LIBRARY_PATH` is cleared which means that our
# tests fail with dyld errors.
#
# To get around this we patch `lit` to reintroduce `DYLD_LIBRARY_PATH`, when
# present in the test configuration.
#
# It's not clear to me why this isn't an issue for LLVM developers running
# on macOS (nothing about this _seems_ nix specific)..
./lit-shell-script-runner-set-dyld-library-path.patch
] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch
# Just like the `llvm-lit-cfg` patch, but for `polly`.
./polly-lit-cfg-add-libs-to-dylib-path.patch
];
postPatch = optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
--replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
# As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
# this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
rm test/MC/ELF/cfi-version.ll
# This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
# and thus fails under the sandbox:
substituteInPlace unittests/TargetParser/Host.cpp \
--replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
# This test tries to call the intrinsics `@llvm.roundeven.f32` and
# `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
# and `roundeven` on macOS.
#
# However these functions are glibc specific so the test fails:
# - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
# - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
#
substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
--replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
--replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
'' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
# This test fails on darwin x86_64 because `sw_vers` reports a different
# macOS version than what LLVM finds by reading
# `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
# the sandbox on macOS).
#
# The `sw_vers` provided by nixpkgs reports the macOS version associated
# with the `CoreFoundation` framework with which it was built. Because
# nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what
# `sw_vers` reports is not guaranteed to match the macOS version of the host
# that's building this derivation.
#
# Astute readers will note that we only _patch_ this test on aarch64-darwin
# (to use the nixpkgs provided `sw_vers`) instead of disabling it outright.
# So why does this test pass on aarch64?
#
# Well, it seems that `sw_vers` on aarch64 actually links against the _host_
# CoreFoundation framework instead of the nixpkgs provided one.
#
# Not entirely sure what the right fix is here. I'm assuming aarch64
# `sw_vers` doesn't intentionally link against the host `CoreFoundation`
# (still digging into how this ends up happening, will follow up) but that
# aside I think the more pertinent question is: should we be patching LLVM's
# macOS version detection logic to use `sw_vers` instead of reading host
# paths? This *is* a way in which details about builder machines can creep
# into the artifacts that are produced, affecting reproducibility, but it's
# not clear to me when/where/for what this even gets used in LLVM.
#
# TODO(@rrbutani): fix/follow-up
substituteInPlace unittests/TargetParser/Host.cpp \
--replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
# This test fails with a `dysmutil` crash; have not yet dug into what's
# going on here (TODO(@rrbutani)).
rm test/tools/dsymutil/ARM/obfuscated.test
'' + ''
# FileSystem permissions tests fail with various special bits
substituteInPlace unittests/Support/CMakeLists.txt \
--replace "Path.cpp" ""
rm unittests/Support/Path.cpp
substituteInPlace unittests/IR/CMakeLists.txt \
--replace "PassBuilderCallbacksTest.cpp" ""
rm unittests/IR/PassBuilderCallbacksTest.cpp
rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
'' + optionalString stdenv.hostPlatform.isMusl ''
patch -p1 -i ${../../TLI-musl.patch}
substituteInPlace unittests/Support/CMakeLists.txt \
--replace "add_subdirectory(DynamicLibrary)" ""
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
# valgrind unhappy with musl or glibc, but fails w/musl only
rm test/CodeGen/AArch64/wineh4.mir
'' + optionalString stdenv.hostPlatform.isAarch32 ''
# skip failing X86 test cases on 32-bit ARM
rm test/DebugInfo/X86/convert-debugloc.ll
rm test/DebugInfo/X86/convert-inlined.ll
rm test/DebugInfo/X86/convert-linked.ll
rm test/tools/dsymutil/X86/op-convert.test
rm test/tools/gold/X86/split-dwarf.ll
rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
rm test/CodeGen/RISCV/attributes.ll
rm test/CodeGen/RISCV/xtheadmempair.ll
'' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
# Seems to require certain floating point hardware (NEON?)
rm test/ExecutionEngine/frem.ll
'' + ''
patchShebangs test/BugPoint/compile-custom.ll.py
'';
preConfigure = ''
# Workaround for configure flags that need to have spaces
cmakeFlagsArray+=(
-DLLVM_LIT_ARGS="-svj''${NIX_BUILD_CORES} --no-progress-bar"
)
'';
# Defensive check: some paths (that we make symlinks to) depend on the release
# version, for example:
# - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185
#
# So we want to sure that the version in the source matches the release
# version we were given.
#
# We do this check here, in the LLVM build, because it happens early.
postConfigure = let
v = lib.versions;
major = v.major release_version;
minor = v.minor release_version;
patch = v.patch release_version;
in ''
# $1: part, $2: expected
check_version() {
part="''${1^^}"
part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)"
if [[ "$part" != "$2" ]]; then
echo >&2 \
"mismatch in the $1 version! we have version ${release_version}" \
"and expected the $1 version to be '$2'; the source has '$part' instead"
exit 3
fi
}
check_version major ${major}
check_version minor ${minor}
check_version patch ${patch}
'';
# E.g. mesa.drivers use the build-id as a cache key (see #93946):
LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
cmakeBuildType = if debugVersion then "Debug" else "Release";
cmakeFlags = with stdenv; let
# These flags influence llvm-config's BuildVariables.inc in addition to the
# general build. We need to make sure these are also passed via
# CROSS_TOOLCHAIN_FLAGS_NATIVE when cross-compiling or llvm-config-native
# will return different results from the cross llvm-config.
#
# Some flags don't need to be repassed because LLVM already does so (like
# CMAKE_BUILD_TYPE), others are irrelevant to the result.
flagsForLlvmConfig = [
"-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
"-DLLVM_ENABLE_RTTI=ON"
] ++ optionals enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
];
in flagsForLlvmConfig ++ [
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
"-DLLVM_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_ENABLE_DUMP=ON"
] ++ 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"
# libxml2 needs to be disabled because the LLVM build system ignores its .la
# file and doesn't link zlib as well.
# https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
"-DLLVM_ENABLE_LIBXML2=OFF"
] ++ optionals enableManpages [
"-DLLVM_BUILD_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (false) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(
let
nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
nativeBintools = nativeCC.bintools.bintools;
nativeToolchainFlags = [
"-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
"-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
"-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
"-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
"-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
];
# We need to repass the custom GNUInstallDirs values, otherwise CMake
# will choose them for us, leading to wrong results in llvm-config-native
nativeInstallFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
"-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "dev"}/include"
"-DCMAKE_INSTALL_LIBDIR=${placeholder "lib"}/lib"
"-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "lib"}/libexec"
];
in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list="
+ lib.concatStringsSep ";" (lib.concatLists [
flagsForLlvmConfig
nativeToolchainFlags
nativeInstallFlags
])
)
];
postInstall = ''
mkdir -p $python/share
mv $out/share/opt-viewer $python/share/opt-viewer
moveToOutput "bin/llvm-config*" "$dev"
substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
--replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
--replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
''
+ optionalString (stdenv.isDarwin && enableSharedLibraries) ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
''
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
inherit doCheck;
checkTarget = "check-all";
# For the update script:
passthru.monorepoSrc = monorepoSrc;
requiredSystemFeatures = [ "big-parallel" ];
meta = llvm_meta // {
homepage = "https://llvm.org/";
description = "A collection of modular and reusable compiler and toolchain technologies";
longDescription = ''
The LLVM Project is a collection of modular and reusable compiler and
toolchain technologies. Despite its name, LLVM has little to do with
traditional virtual machines. The name "LLVM" itself is not an acronym; it
is the full name of the project.
LLVM began as a research project at the University of Illinois, with the
goal of providing a modern, SSA-based compilation strategy capable of
supporting both static and dynamic compilation of arbitrary programming
languages. Since then, LLVM has grown to be an umbrella project consisting
of a number of subprojects, many of which are being used in production by
a wide variety of commercial and open source projects as well as being
widely used in academic research. Code in the LLVM project is licensed
under the "Apache 2.0 License with LLVM exceptions".
'';
};
} // lib.optionalAttrs enableManpages {
pname = "llvm-manpages";
propagatedBuildInputs = [];
ninjaFlags = [ "docs-llvm-man" ];
installTargets = [ "install-docs-llvm-man" ];
postPatch = null;
postInstall = null;
outputs = [ "out" ];
doCheck = false;
meta = llvm_meta // {
description = "man pages for LLVM ${version}";
};
})

View File

@ -0,0 +1,19 @@
This is the one remaining Polly install dirs related change that hasn't made it
into upstream yet; previously this patch file also included:
https://reviews.llvm.org/D117541
diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
index 518a09b45a42..bd9d6f5542ad 100644
--- a/tools/polly/cmake/polly_macros.cmake
+++ b/tools/polly/cmake/polly_macros.cmake
@@ -44,8 +44,8 @@ macro(add_polly_library name)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
install(TARGETS ${name}
EXPORT LLVMExports
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
endmacro(add_polly_library)

View File

@ -0,0 +1,137 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 471817d68286..c51463304159 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1010,7 +1010,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
install(TARGETS tf_xla_runtime EXPORT LLVMExports
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
# Once we add more modules, we should handle this more automatically.
if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 230620c37027..dd16cab1835e 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -876,8 +876,8 @@ macro(add_llvm_library name)
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
install(TARGETS ${name}
${export_to_llvmexports}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
if (NOT LLVM_ENABLE_IDE)
@@ -2069,7 +2069,7 @@ function(llvm_install_library_symlink name dest type)
set(LLVM_LINK_OR_COPY copy)
endif()
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 AND "${type}" STREQUAL "SHARED")
set(output_dir "${CMAKE_INSTALL_BINDIR}")
endif()
@@ -2344,16 +2344,37 @@ function(llvm_setup_rpath name)
if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
- set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
# $ORIGIN is not interpreted at link time by aix ld.
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
# hardcode the rpath to build/install lib dir first in this mode.
# FIXME: update this when there is better solution.
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(UNIX)
- set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
+ # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
+ # to `_install_rpath` here.
+ #
+ # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
+ # clang); instead LLVM is its own package and thus lands at its own nix
+ # store path. This makes it so that the default relative rpath (`../lib/`)
+ # does not point at the LLVM shared objects.
+ #
+ # More discussion here:
+ # - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
+ # - https://reviews.llvm.org/D146918 (16.0.5+)
+ #
+ # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
+ # no potential that this will result in us pulling in the "wrong" LLVM.
+ # Adding this to the build rpath means we aren't forced to use
+ # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
+ # dir, pre-install, will have the right rpath for LLVM).
+ #
+ # As noted in the differential above, an alternative solution is to have
+ # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
+ # `CMAKE_INSTALL_RPATH`.
+ set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
set_property(TARGET ${name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-z,origin ")
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
index 891c9e6d618c..8d963f3b0069 100644
--- a/cmake/modules/AddOCaml.cmake
+++ b/cmake/modules/AddOCaml.cmake
@@ -147,9 +147,9 @@ function(add_ocaml_library name)
endforeach()
if( APPLE )
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
elseif( UNIX )
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
endif()
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index d99af79aa38e..21e794224b99 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
)
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
+extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_CONFIG_LIBRARY_DIR}"
# FIXME: Should there be other entries here?
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
index 370005cd8d7d..7e790bc52111 100644
--- a/tools/llvm-config/BuildVariables.inc.in
+++ b/tools/llvm-config/BuildVariables.inc.in
@@ -23,6 +23,7 @@
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
#define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index e86eb2b44b10..f63e207e792e 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
sys::fs::make_absolute(ActivePrefix, Path);
ActiveBinDir = std::string(Path.str());
}
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+ {
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
+ sys::fs::make_absolute(ActivePrefix, Path);
+ ActiveLibDir = std::string(Path.str());
+ }
{
SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
sys::fs::make_absolute(ActivePrefix, Path);

View File

@ -0,0 +1,17 @@
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index 0242e0b75af3..d732011306f7 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/utils/lit/lit/TestRunner.py
@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
f.write('@echo off\n')
f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
else:
+ # This env var is *purged* when invoking subprocesses so we have to
+ # manually set it from within the bash script in order for the commands
+ # in run lines to see this var:
+ if "DYLD_LIBRARY_PATH" in test.config.environment:
+ f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
+
for i, ln in enumerate(commands):
match = re.match(kPdbgRegex, ln)
if match:

View File

@ -0,0 +1,80 @@
diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py
index 81e8dc04acea..479ff95681e2 100644
--- a/test/Unit/lit.cfg.py
+++ b/test/Unit/lit.cfg.py
@@ -3,6 +3,7 @@
# Configuration file for the 'lit' test runner.
import os
+import platform
import subprocess
import lit.formats
@@ -55,3 +56,26 @@ if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):
# Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
if sys.platform == "win32" and "SYSTEMDRIVE" in os.environ:
config.environment["SYSTEMDRIVE"] = os.environ["SYSTEMDRIVE"]
+
+# Add the LLVM dynamic libs to the platform-specific loader search path env var:
+#
+# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
+def find_shlibpath_var():
+ if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
+ yield "LD_LIBRARY_PATH"
+ elif platform.system() == "Darwin":
+ yield "DYLD_LIBRARY_PATH"
+ elif platform.system() == "Windows":
+ yield "PATH"
+ elif platform.system() == "AIX":
+ yield "LIBPATH"
+
+for shlibpath_var in find_shlibpath_var():
+ shlibpath = os.path.pathsep.join(
+ (config.shlibdir,
+ config.environment.get(shlibpath_var, '')))
+ config.environment[shlibpath_var] = shlibpath
+ break
+else:
+ lit_config.warning("unable to inject shared library path on '{}'"
+ .format(platform.system()))
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
index 75a38b4c5dad..856fc75c9d74 100644
--- a/test/lit.cfg.py
+++ b/test/lit.cfg.py
@@ -42,6 +42,26 @@ llvm_config.with_environment("PATH", config.llvm_tools_dir, append_path=True)
llvm_config.with_system_environment(
["HOME", "INCLUDE", "LIB", "TMP", "TEMP"])
+# Add the LLVM dynamic libs to the platform-specific loader search path env var:
+#
+# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
+def find_shlibpath_var():
+ if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
+ yield "LD_LIBRARY_PATH"
+ elif platform.system() == "Darwin":
+ yield "DYLD_LIBRARY_PATH"
+ elif platform.system() == "Windows":
+ yield "PATH"
+ elif platform.system() == "AIX":
+ yield "LIBPATH"
+
+for shlibpath_var in find_shlibpath_var():
+ shlibpath = config.llvm_shlib_dir
+ llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True)
+ break
+else:
+ lit_config.warning("unable to inject shared library path on '{}'"
+ .format(platform.system()))
# Set up OCAMLPATH to include newly built OCaml libraries.
top_ocaml_lib = os.path.join(config.llvm_lib_dir, "ocaml")
@@ -318,7 +338,7 @@ def have_cxx_shared_library():
try:
readobj_cmd = subprocess.Popen(
- [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE
+ [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE, env=config.environment
)
except OSError:
print("could not exec llvm-readobj")

View File

@ -0,0 +1,24 @@
diff --git a/tools/polly/test/lit.cfg b/tools/polly/test/lit.cfg
index 41e3a589c61e..09f3b17498b0 100644
--- a/tools/polly/test/lit.cfg
+++ b/tools/polly/test/lit.cfg
@@ -36,9 +36,17 @@ base_paths = [config.llvm_tools_dir, config.environment['PATH']]
path = os.path.pathsep.join(base_paths + config.extra_paths)
config.environment['PATH'] = path
+# (Copied from polly/test/Unit/lit.cfg)
+if platform.system() == 'Darwin':
+ shlibpath_var = 'DYLD_LIBRARY_PATH'
+elif platform.system() == 'Windows':
+ shlibpath_var = 'PATH'
+else:
+ shlibpath_var = 'LD_LIBRARY_PATH'
+
path = os.path.pathsep.join((config.llvm_libs_dir,
- config.environment.get('LD_LIBRARY_PATH','')))
-config.environment['LD_LIBRARY_PATH'] = path
+ config.environment.get(shlibpath_var,'')))
+config.environment[shlibpath_var] = path
llvm_config.use_default_substitutions()

View File

@ -0,0 +1,74 @@
{ lib
, stdenv
, llvm_meta
, monorepoSrc
, runCommand
, cmake
, ninja
, llvm
, targetLlvm
, lit
, clang-unwrapped
, perl
, pkg-config
, xcbuild
, version
}:
stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
src = runCommand "${pname}-src-${version}" {} ''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
'';
sourceRoot = "${src.name}/${pname}";
patches = [
./fix-find-tool.patch
./gnu-install-dirs.patch
./run-lit-directly.patch
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake ninja perl pkg-config lit ];
buildInputs = [
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
];
nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
# Unsup:Pass:XFail:Fail
# 26:267:16:8
doCheck = false;
checkTarget = "check-openmp";
preCheck = ''
patchShebangs ../tools/archer/tests/deflake.bash
'';
cmakeFlags = [
"-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
"-DOPT_TOOL=${llvm}/bin/opt"
"-DLINK_TOOL=${llvm}/bin/llvm-link"
];
meta = llvm_meta // {
homepage = "https://openmp.llvm.org/";
description = "Support for the OpenMP language";
longDescription = ''
The OpenMP subproject of LLVM contains the components required to build an
executable OpenMP program that are outside the compiler itself.
Contains the code for the runtime library against which code compiled by
"clang -fopenmp" must be linked before it can run and the library that
supports offload to target devices.
'';
# "All of the code is dual licensed under the MIT license and the UIUC
# License (a BSD-like license)":
license = with lib.licenses; [ mit ncsa ];
};
}

View File

@ -0,0 +1,17 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
index 630947abec7e..9f032dc7bd3f 100644
--- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -27,10 +27,10 @@ endif()
if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set.
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
return()

View File

@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6ddbe90516d..311ab1d50e7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
"Suffix of lib installation directory, e.g. 64 => lib64")
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
- set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
+ set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
# Group test settings.
set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
else()
set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
# If building in tree, we honor the same install suffix LLVM uses.
- set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
+ set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
if (NOT MSVC)
set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)

View File

@ -23,6 +23,7 @@
, monorepoSrc ? null
, patches ? [ ]
, enableManpages ? false
, ...
}:
let
@ -108,6 +109,8 @@ stdenv.mkDerivation (rec {
"-DLLDB_USE_SYSTEM_DEBUGSERVER=ON"
] ++ lib.optionals (!stdenv.isDarwin) [
"-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
] ++ lib.optionals (lib.versionAtLeast release_version "17") [
"-DCLANG_RESOURCE_DIR=../../../../${libclang.lib}"
] ++ lib.optionals enableManpages ([
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"

View File

@ -30,6 +30,7 @@ let
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
"-DLLVM_INCLUDE_TESTS=OFF"
] ++ lib.optionals enableManpages [
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
@ -51,10 +52,11 @@ let
# https://reviews.llvm.org/D51899
./gnu-install-dirs.patch
../../common/clang/add-nostdlibinc-flag.patch
(substituteAll {
src = ../../clang-11-12-LLVMgold-path.patch;
libllvmLibdir = "${libllvm.lib}/lib";
})
# FIMXE: do we need this patch?
# (substituteAll {
# src = ../../clang-11-12-LLVMgold-path.patch;
# libllvmLibdir = "${libllvm.lib}/lib";
# })
];
postPatch = ''
@ -65,15 +67,12 @@ let
outputs = [ "out" "lib" "dev" "python" ];
env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
# The following warning is triggered with (at least) gcc >=
# 12, but appears to occur only for cross compiles.
NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized";
};
postInstall = ''
ln -sv $out/bin/clang $out/bin/cpp
mkdir -p $lib/lib/clang
mv $lib/lib/18 $lib/lib/clang/18
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
moveToOutput "lib/libclang-cpp.*" "$lib"
@ -81,13 +80,12 @@ let
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
mkdir -p $python/bin $python/share/{clang,scan-view}
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
mv $out/bin/set-xcode-analyzer $python/bin
fi
mv $out/share/clang/*.py $python/share/clang
mv $out/share/scan-view/*.py $python/share/scan-view
rm $out/bin/c-index-test
patchShebangs $python/bin

View File

@ -1,38 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c27beec313d7..480f13e73c9f 100644
index f7936d72e088..a362fa49b534 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,15 +78,17 @@ if(CLANG_BUILT_STANDALONE)
if (NOT LLVM_CONFIG_FOUND)
# Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
# path is removed.
- set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
@@ -31,7 +31,21 @@ if(CLANG_BUILT_STANDALONE)
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
- # Turn into CACHE PATHs for overwritting
+ # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
+ # LLVM_CONFIG.
+ if (NOT LLVM_CONFIG_FOUND)
+ # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
+ # path is removed.
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
# N.B. this is just a default value, the CACHE PATHs below can be overriden.
set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
+ set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
+ # N.B. this is just a default value, the CACHE PATHs below can be overriden.
+ set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+ set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
+ set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
+ else()
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
endif()
- set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
@@ -128,7 +130,7 @@ if(CLANG_BUILT_STANDALONE)
set(LLVM_INCLUDE_TESTS ON)
endif()
- include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
+ include_directories(${LLVM_INCLUDE_DIRS})
link_directories("${LLVM_LIBRARY_DIR}")
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
+ endif()
+
set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index 21ac332e4f5f..b16c314bd1e2 100644
index 75b0080f6715..c895b884cd27 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -119,8 +119,8 @@ macro(add_clang_library name)
@ -47,23 +41,22 @@ index 21ac332e4f5f..b16c314bd1e2 100644
if (NOT LLVM_ENABLE_IDE)
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
index 6e2060991b92..b9bc930d26b8 100644
index f2b0c5cddcbb..52f37fc368ce 100644
--- a/lib/Headers/CMakeLists.txt
+++ b/lib/Headers/CMakeLists.txt
@@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
add_header_target("windows-resource-headers" ${windows_only_files})
@@ -473,6 +473,7 @@ add_header_target("windows-resource-headers" ${windows_only_files})
add_header_target("utility-resource-headers" ${utility_files})
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
get_clang_resource_dir(header_install_dir SUBDIR include)
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${CLANG_VERSION_MAJOR}/include)
#############################################################
# Install rules for the catch-all clang-resource-headers target
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index 8d95d0900e8c..ebc70ff7526d 100644
index 4f23065a2472..6a0f55991e24 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -180,7 +180,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
@@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
COMPONENT
libclang-python-bindings
DESTINATION
@ -73,14 +66,14 @@ index 8d95d0900e8c..ebc70ff7526d 100644
if(NOT LLVM_ENABLE_IDE)
add_custom_target(libclang-python-bindings)
diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
index 061dc7ef4dd9..adc54b2edc32 100644
index 3aca22c0b0a8..3115353e3fe3 100644
--- a/tools/scan-build-py/CMakeLists.txt
+++ b/tools/scan-build-py/CMakeLists.txt
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
install(PROGRAMS lib/libscanbuild/${lib}
- DESTINATION lib/libscanbuild
install(FILES lib/libscanbuild/${lib}
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
COMPONENT scan-build-py)
endforeach()
@ -88,8 +81,8 @@ index 061dc7ef4dd9..adc54b2edc32 100644
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
install(PROGRAMS lib/libscanbuild/resources/${resource}
- DESTINATION lib/libscanbuild/resources
install(FILES lib/libscanbuild/resources/${resource}
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
COMPONENT scan-build-py)
endforeach()
@ -97,8 +90,8 @@ index 061dc7ef4dd9..adc54b2edc32 100644
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
install(PROGRAMS lib/libear/${lib}
- DESTINATION lib/libear
install(FILES lib/libear/${lib}
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
COMPONENT scan-build-py)
endforeach()

View File

@ -1,33 +0,0 @@
From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Tue, 19 Sep 2017 13:13:06 -0500
Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
needs it
---
cmake/Modules/AddCompilerRT.cmake | 8 ------
test/asan/CMakeLists.txt | 52 ---------------------------------------
test/tsan/CMakeLists.txt | 47 -----------------------------------
3 files changed, 107 deletions(-)
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index bc69ec95c419..9f100fdcec2f 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -366,14 +366,6 @@ function(add_compiler_rt_runtime name type)
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
endif()
- if(APPLE)
- # Ad-hoc sign the dylibs
- add_custom_command(TARGET ${libname}
- POST_BUILD
- COMMAND codesign --sign - $<TARGET_FILE:${libname}>
- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR}
- )
- endif()
endif()
set(parent_target_arg)
2.14.1

View File

@ -9,7 +9,8 @@ let
useLLVM = stdenv.hostPlatform.useLLVM or false;
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
haveLibc = stdenv.cc.libc != null;
inherit (stdenv.hostPlatform) isMusl;
isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic;
inherit (stdenv.hostPlatform) isMusl isGnu;
baseName = "compiler-rt";
@ -31,9 +32,16 @@ stdenv.mkDerivation {
++ lib.optional stdenv.isDarwin xcbuild.xcrun;
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
env.NIX_CFLAGS_COMPILE = toString [
env.NIX_CFLAGS_COMPILE = toString ([
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
];
] ++ lib.optionals (!haveLibc) [
# The compiler got stricter about this, and there is a usellvm patch below
# which patches out the assert include causing an implicit definition of
# assert. It would be nicer to understand why compiler-rt thinks it should
# be able to #include <assert.h> in the first place; perhaps it's in the
# wrong, or perhaps there is a way to provide an assert.h.
"-Wno-error=implicit-function-declaration"
]);
cmakeFlags = [
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
@ -41,19 +49,22 @@ stdenv.mkDerivation {
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
] ++ lib.optionals (haveLibc && stdenv.hostPlatform.libc == "glibc") [
"-DSANITIZER_COMMON_CFLAGS=-I${libxcrypt}/include"
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
] ++ lib.optionals (useLLVM || bareMetal || isMusl || isDarwinStatic) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal || isDarwinStatic ) [
"-DCMAKE_CXX_COMPILER_WORKS=ON"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
"-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
] ++ lib.optionals (useLLVM && !haveLibc) [
"-DCMAKE_C_FLAGS=-nodefaultlibs"
] ++ lib.optionals (useLLVM) [
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
#https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
@ -61,18 +72,16 @@ stdenv.mkDerivation {
] ++ lib.optionals (bareMetal) [
"-DCOMPILER_RT_OS_DIR=baremetal"
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
"-DCMAKE_LIPO=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo"
"-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
"-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
# `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin:
# https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153
"-DCOMPILER_RT_ENABLE_IOS=OFF"
];
preConfigure = lib.optionalString (useLLVM && !haveLibc) ''
cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding")
'';
outputs = [ "out" "dev" ];
patches = [
@ -86,7 +95,7 @@ stdenv.mkDerivation {
# See: https://github.com/NixOS/nixpkgs/pull/186575
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
# See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
../../common/compiler-rt/armv7l-15.patch
# ../../common/compiler-rt/armv7l-15.patch
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
@ -100,7 +109,7 @@ stdenv.mkDerivation {
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + lib.optionalString (useLLVM) ''
'' + lib.optionalString (useLLVM && !haveLibc) ''
substituteInPlace lib/builtins/int_util.c \
--replace "#include <stdlib.h>" ""
substituteInPlace lib/builtins/clear_cache.c \
@ -115,10 +124,16 @@ stdenv.mkDerivation {
'' + lib.optionalString (useLLVM) ''
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
# Note the history of crt{begin,end}S in previous versions of llvm in nixpkg:
# The presence of crtbegin_shared has been added and removed; it's possible
# people have added/removed it to get it working on their platforms.
# Try each in turn for now.
ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbeginS.o
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtendS.o
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
'' + lib.optionalString doFakeLibgcc ''
ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
'';
meta = llvm_meta // {

View File

@ -1,16 +1,16 @@
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index f1f46fb9599c..6f19e69507ba 100644
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index 4c85551d7766..297d7a47c54b 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/cmake/Modules/CompilerRTUtils.cmake
@@ -302,8 +302,9 @@ macro(load_llvm_config)
# Get some LLVM variables from LLVMConfig.
include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
- set(LLVM_LIBRARY_OUTPUT_INTDIR
- ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+ get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
+ ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
+ REALPATH)
@@ -328,8 +328,9 @@ macro(load_llvm_config)
endif()
endif()
endmacro()
- set(LLVM_LIBRARY_OUTPUT_INTDIR
- ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+ get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
+ ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
+ REALPATH)
set(LLVM_MAIN_SRC_DIR "${LLVM_MAIN_SRC_DIR_DEFAULT}" CACHE PATH "Path to LLVM source tree")
message(STATUS "LLVM_MAIN_SRC_DIR: \"${LLVM_MAIN_SRC_DIR}\"")

View File

@ -1,11 +1,11 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
, preLibcCrossHeaders
{ lowPrio, newScope, pkgs, lib, stdenv, stdenvNoCC, cmake, ninja
, gccForLibs, preLibcCrossHeaders
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
, targetLlvm
# This is the default binutils, but with *this* version of LLD rather
# than the default LLVM version's, if LLD is the choice. We use these for
# than the default LLVM verion's, if LLD is the choice. We use these for
# the `useLLVM` bootstrapping below.
, bootBintoolsNoLibc ?
if stdenv.targetPlatform.linker == "lld"
@ -17,7 +17,12 @@
else pkgs.bintools
, darwin
# LLVM release information; specify one of these but not both:
, gitRelease ? null
, gitRelease ? {
version = "18.0.0";
rev = "6f44f87011cd52367626cac111ddbb2d25784b90";
rev-version = "unstable-2023-10-04";
sha256 = "sha256-CqsCDlzg8I2c9BybKP7B5nfHiQWktqgVavrfiYkjkx4=";
}
# i.e.:
# {
# version = /* i.e. "15.0.0" */;
@ -25,7 +30,7 @@
# rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
# }
, officialRelease ? { version = "15.0.7"; sha256 = "sha256-wjuZQyXQ/jsmvy6y1aksCcEDXGBjuhpgngF3XQJ/T4s="; }
, officialRelease ? null
# i.e.:
# {
# version = /* i.e. "15.0.0" */;
@ -40,6 +45,7 @@
# specified.
, monorepoSrc ? null
}:
assert let
int = a: if a then 1 else 0;
xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
@ -60,10 +66,11 @@ in let
tools = lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
major = lib.versions.major release_version;
mkExtraBuildCommands0 = cc: ''
rsrc="$out/resource-root"
mkdir "$rsrc"
ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
ln -s "${cc.lib}/lib/clang/${major}/include" "$rsrc"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
'';
mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
@ -106,16 +113,14 @@ in let
python3 = pkgs.python3; # don't use python-boot
});
# TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
# lldb-manpages = lowPrio (tools.lldb.override {
# enableManpages = true;
# python3 = pkgs.python3; # don't use python-boot
# });
lldb-manpages = lowPrio (tools.lldb.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
# pick clang appropriate for package set we are targeting
clang =
/**/ if stdenv.targetPlatform.libc == null then tools.clangNoLibc
else if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
/**/ if stdenv.targetPlatform.useLLVM or false then tools.clangUseLLVM
else if (pkgs.targetPackages.stdenv or stdenv).cc.isGNU then tools.libstdcxxClang
else tools.libcxxClang;
@ -160,10 +165,24 @@ in let
{ };
in
[
./lldb/procfs.patch # FIXME: do we need this?
# FIXME: do we need this? ./procfs.patch
resourceDirPatch
./lldb/gnu-install-dirs.patch
];
]
# This is a stopgap solution if/until the macOS SDK used for x86_64 is
# updated.
#
# The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h`
# header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use
# of this preprocessor symbol in `lldb` with its expansion.
#
# See here for some context:
# https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
++ lib.optional (
stdenv.targetPlatform.isDarwin
&& !stdenv.targetPlatform.isAarch64
&& (lib.versionOlder darwin.apple_sdk.sdk.version "11.0")
) ./lldb/cpu_subtype_arm64e_replacement.patch;
inherit llvm_meta;
};
@ -200,6 +219,14 @@ in let
[ "-rtlib=compiler-rt"
"-Wno-unused-command-line-argument"
"-B${targetLlvmLibraries.compiler-rt}/lib"
# Combat "__cxxabi_config.h not found". Maybe this could be fixed by
# copying these headers into libcxx? Note that building libcxx
# outside of monorepo isn't supported anymore, might be related to
# https://github.com/llvm/llvm-project/issues/55632
# ("16.0.3 libcxx, libcxxabi: circular build dependencies")
# Looks like the machinery changed in https://reviews.llvm.org/D120727.
"-I${lib.getDev targetLlvmLibraries.libcxx.cxxabi}/include/c++/v1"
]
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
++ lib.optional
@ -262,7 +289,7 @@ in let
compiler-rt-libc = callPackage ./compiler-rt {
inherit llvm_meta;
stdenv = if stdenv.hostPlatform.useLLVM or false
stdenv = if stdenv.hostPlatform.useLLVM or false || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic)
then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
else stdenv;
};
@ -275,7 +302,7 @@ in let
};
# N.B. condition is safe because without useLLVM both are the same.
compiler-rt = if stdenv.hostPlatform.isAndroid
compiler-rt = if stdenv.hostPlatform.isAndroid || stdenv.hostPlatform.isDarwin
then libraries.compiler-rt-libc
else libraries.compiler-rt-no-libc;

View File

@ -45,12 +45,6 @@ stdenv.mkDerivation rec {
chmod -R u+w .
'';
patches = [
./gnu-install-dirs.patch
] ++ lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
];
postPatch = ''
cd ../runtimes
'';
@ -66,7 +60,6 @@ stdenv.mkDerivation rec {
lib.optionals (!headersOnly) [ cxxabi ]
++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ libunwind ];
cmakeFlags = let
# See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string
libcxx_cxx_abi_opt = {
@ -80,15 +73,12 @@ stdenv.mkDerivation rec {
++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DLIBCXX_USE_COMPILER_RT=ON"
# (Backport fix from 16, which has LIBCXX_ADDITIONAL_LIBRARIES, but 15
# does not appear to)
# There's precedent for this in llvm-project/libcxx/cmake/caches.
# In a monorepo build you might do the following in the libcxxabi build:
# -DLLVM_ENABLE_PROJECTS=libcxxabi;libunwinder
# -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=On
# libcxx appears to require unwind and doesn't pull it in via other means.
# "-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
"-DCMAKE_SHARED_LINKER_FLAGS=-lunwind"
"-DLIBCXX_ADDITIONAL_LIBRARIES=unwind"
] ++ lib.optionals stdenv.hostPlatform.isWasm [
"-DLIBCXX_ENABLE_THREADS=OFF"
"-DLIBCXX_ENABLE_FILESYSTEM=OFF"

View File

@ -1,22 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74eff2002fc9..c935d10878bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -419,7 +419,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libc++ libraries should be installed.")
set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
"Path where target-specific libc++ headers should be installed.")
@@ -436,7 +436,7 @@ else()
set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
endif()
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++ libraries should be installed.")
set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
"Path where target-specific libc++ headers should be installed.")

View File

@ -82,23 +82,11 @@ stdenv.mkDerivation rec {
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
if [ -L "$file" ]; then continue; fi
# Fix up the install name. Preserve the basename, just replace the path.
installName="$out/lib/$(basename $(${stdenv.cc.targetPrefix}otool -D $file | tail -n 1))"
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
${stdenv.cc.targetPrefix}install_name_tool -id $installName $file
# cc-wrapper passes '-lc++abi' to all c++ link steps, but that causes
# libcxxabi to sometimes link against a different version of itself.
# Here we simply make that second reference point to ourselves.
for other in $(${stdenv.cc.targetPrefix}otool -L $file | awk '$1 ~ "/libc\\+\\+abi" { print $1 }'); do
${stdenv.cc.targetPrefix}install_name_tool -change $other $installName $file
done
install_name_tool -id $out/$file $file
done
'';
@ -121,5 +109,8 @@ stdenv.mkDerivation rec {
# the UIUC License (a BSD-like license)":
license = with lib.licenses; [ mit ncsa ];
maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
# Broken until https://github.com/llvm/llvm-project/issues/64226 is resolved
# We should check if the version is not 10.13 but that is currently broken.
broken = stdenv.isDarwin && stdenv.isx86_64;
};
}

View File

@ -1,21 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8326d08d23a..a1e36f713161 100644
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index f380fe6b6b92..a9656258c38e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,7 +187,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
@@ -188,7 +188,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libc++abi libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
@@ -201,7 +201,7 @@ else()
@@ -202,7 +202,7 @@ else()
set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
endif()
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++abi libraries should be installed.")
endif()

View File

@ -32,10 +32,6 @@ stdenv.mkDerivation rec {
chmod -R u+w .
'';
patches = [
./gnu-install-dirs.patch
];
postPatch = ''
cd ../runtimes
'';

View File

@ -1,22 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a06805f05f1..86a50329e6a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libunwind libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
@@ -129,7 +129,7 @@ else()
else()
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
endif()
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
"Path where built libunwind libraries should be installed.")
endif()

View File

@ -1,34 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dcc649629a4b..58dca54642e4 100644
index 3d6225646fe6..9b5d0b15af13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,13 +70,15 @@ if(LLD_BUILT_STANDALONE)
if (NOT LLVM_CONFIG_FOUND)
# Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
# path is removed.
- set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
@@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE)
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
- # Turn into CACHE PATHs for overwriting
- set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
- set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
- set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
+ # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
+ # LLVM_CONFIG.
+ if (NOT LLVM_CONFIG_FOUND)
+ # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
+ # path is removed.
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
# N.B. this is just a default value, the CACHE PATHs below can be overridden.
set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+ set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
+ # N.B. this is just a default value, the CACHE PATHs below can be overridden.
+ set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+ else()
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
endif()
- set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
+ endif()
+
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
+ set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
+ set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
@@ -95,7 +97,7 @@ if(LLD_BUILT_STANDALONE)
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
- include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS})
+ include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
if(LLVM_INCLUDE_TESTS)
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
index d3924f7243d4..42a7cd62281c 100644
--- a/cmake/modules/AddLLD.cmake

View File

@ -0,0 +1,12 @@
diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
--- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
len = sizeof(is_64_bit_capable);
::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0);
- if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) {
+ if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers
// The arm64e architecture is a preview. Pretend the host architecture
// is arm64.
cpusubtype = CPU_SUBTYPE_ARM64_ALL;

View File

@ -1,14 +1,20 @@
--- a/source/Plugins/Process/Linux/Procfs.h
+++ b/source/Plugins/Process/Linux/Procfs.h
@@ -10,6 +10,7 @@
@@ -10,6 +10,13 @@
// sys/procfs.h on Android/Linux for all supported architectures.
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
+
+// on i686 preprocessor symbols with these register names are defined as
+// numeric constants; these symbols clash with identifier names used in
+// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
+#undef FS
+#undef CS
#include "lldb/lldb-types.h"
@@ -17,23 +18,13 @@
@@ -17,23 +24,13 @@
#include <vector>

View File

@ -1,13 +1,14 @@
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 37364341ff8b..7f74c1a3e257 100644
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
index ec06ba285f27..286162f098fb 100644
--- a/cmake/modules/LLDBConfig.cmake
+++ b/cmake/modules/LLDBConfig.cmake
@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
# Iterate over the possible places where the external resource directory
@@ -290,7 +290,8 @@ if (NOT TARGET clang-resource-headers)
# could be and pick the first that exists.
foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
- "${LLVM_BUILD_LIBRARY_DIR}"
+ "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
"${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
"${LLVM_BUILD_LIBRARY_DIR}"
- "${LLVM_LIBRARY_DIR}")
+ "${LLVM_LIBRARY_DIR}"
+ "@clangLibDir@")
# Build the resource directory path by appending 'clang/<version number>'.
set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}")

View File

@ -7,8 +7,10 @@
, darwin
, ninja
, python3
, python3Packages
, libffi
, enableGoldPlugin ? (!stdenv.isDarwin && !stdenv.targetPlatform.isWasi)
# TODO: Gold plugin on LLVM16 has a severe memory corruption bug: https://github.com/llvm/llvm-project/issues/61350.
, enableGoldPlugin ? false
, libbfd
, libpfm
, libxml2
@ -56,12 +58,17 @@ let
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
# Note that we _explicitly_ ask for a python interpreter for our host
# platform here; the splicing that would ordinarily take care of this for
# us does not seem to work once we use `withPackages`.
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
in pkgsBuildBuild.targetPackages.python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
in
assert (lib.assertMsg (!enableGoldPlugin) "Gold plugin cannot be enabled on LLVM16 due to a upstream issue: https://github.com/llvm/llvm-project/issues/61350");
stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -80,7 +87,11 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake ninja python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
++ optionals enableManpages [
# Note: we intentionally use `python3Packages` instead of `python3.pkgs`;
# splicing does *not* work with the latter. (TODO: fix)
python3Packages.sphinx python3Packages.recommonmark
];
buildInputs = [ libxml2 libffi ]
++ optional enablePFM libpfm; # exegesis
@ -134,13 +145,6 @@ in stdenv.mkDerivation (rec {
# It's not clear to me why this isn't an issue for LLVM developers running
# on macOS (nothing about this _seems_ nix specific)..
./lit-shell-script-runner-set-dyld-library-path.patch
# Fix musl build.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch";
relative = "llvm";
hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA=";
})
] ++ lib.optionals enablePolly [
./gnu-install-dirs-polly.patch
@ -152,29 +156,28 @@ in stdenv.mkDerivation (rec {
substituteInPlace cmake/modules/AddLLVM.cmake \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
--replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
# As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick
# this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7
rm test/MC/ELF/cfi-version.ll
# This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`)
# and thus fails under the sandbox:
substituteInPlace unittests/Support/Host.cpp \
substituteInPlace unittests/TargetParser/Host.cpp \
--replace '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers" }"
'' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
# This test tries to call the intrinsics `@llvm.roundeven.f32` and
# `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf`
# and `roundeven` on x86_64 macOS.
# and `roundeven` on macOS.
#
# However these functions are glibc specific so the test fails:
# - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html
# - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html
#
# TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it
# pass there?
substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
--replace "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
--replace "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
'' + optionalString (stdenv.isDarwin && stdenv.hostPlatform.isx86) ''
# This test fails on darwin x86_64 because `sw_vers` reports a different
# macOS version than what LLVM finds by reading
# `/System/Library/CoreServices/SystemVersion.plist` (which is passed into
@ -203,13 +206,13 @@ in stdenv.mkDerivation (rec {
# not clear to me when/where/for what this even gets used in LLVM.
#
# TODO(@rrbutani): fix/follow-up
substituteInPlace unittests/Support/Host.cpp \
substituteInPlace unittests/TargetParser/Host.cpp \
--replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
# This test fails with a `dysmutil` crash; have not yet dug into what's
# going on here (TODO(@rrbutani)).
rm test/tools/dsymutil/ARM/obfuscated.test
'' + ''
'' + ''
# FileSystem permissions tests fail with various special bits
substituteInPlace unittests/Support/CMakeLists.txt \
--replace "Path.cpp" ""
@ -321,7 +324,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (enableGoldPlugin) [
] ++ optionals (false) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45399dc0537e..5d946e9e6583 100644
index 471817d68286..c51463304159 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -942,7 +942,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
@@ -1010,7 +1010,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
install(TARGETS tf_xla_runtime EXPORT LLVMExports
@ -12,10 +12,10 @@ index 45399dc0537e..5d946e9e6583 100644
# Once we add more modules, we should handle this more automatically.
if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 057431208322..56f0dcb258da 100644
index 230620c37027..dd16cab1835e 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -844,8 +844,8 @@ macro(add_llvm_library name)
@@ -876,8 +876,8 @@ macro(add_llvm_library name)
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
install(TARGETS ${name}
${export_to_llvmexports}
@ -26,16 +26,16 @@ index 057431208322..56f0dcb258da 100644
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
if (NOT LLVM_ENABLE_IDE)
@@ -2007,7 +2007,7 @@ function(llvm_install_library_symlink name dest type)
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
@@ -2069,7 +2069,7 @@ function(llvm_install_library_symlink name dest type)
set(LLVM_LINK_OR_COPY copy)
endif()
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 AND "${type}" STREQUAL "SHARED")
set(output_dir "${CMAKE_INSTALL_BINDIR}")
endif()
@@ -2271,15 +2271,15 @@ function(llvm_setup_rpath name)
@@ -2344,16 +2344,37 @@ function(llvm_setup_rpath name)
if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
@ -49,7 +49,30 @@ index 057431208322..56f0dcb258da 100644
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(UNIX)
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
- set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
+ # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
+ # to `_install_rpath` here.
+ #
+ # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
+ # clang); instead LLVM is its own package and thus lands at its own nix
+ # store path. This makes it so that the default relative rpath (`../lib/`)
+ # does not point at the LLVM shared objects.
+ #
+ # More discussion here:
+ # - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
+ # - https://reviews.llvm.org/D146918 (16.0.5+)
+ #
+ # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
+ # no potential that this will result in us pulling in the "wrong" LLVM.
+ # Adding this to the build rpath means we aren't forced to use
+ # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
+ # dir, pre-install, will have the right rpath for LLVM).
+ #
+ # As noted in the differential above, an alternative solution is to have
+ # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
+ # `CMAKE_INSTALL_RPATH`.
+ set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
set_property(TARGET ${name} APPEND_STRING PROPERTY
@ -71,10 +94,10 @@ index 891c9e6d618c..8d963f3b0069 100644
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index d4b0ab959148..26ed981fd09f 100644
index d99af79aa38e..21e794224b99 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -128,7 +128,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
)
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
@ -83,30 +106,6 @@ index d4b0ab959148..26ed981fd09f 100644
set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_CONFIG_LIBRARY_DIR}"
# FIXME: Should there be other entries here?
diff --git a/docs/CMake.rst b/docs/CMake.rst
index 879b7b231d4c..9c31d14e8950 100644
--- a/docs/CMake.rst
+++ b/docs/CMake.rst
@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
**LLVM_LIBDIR_SUFFIX**:STRING
Extra suffix to append to the directory where libraries are to be
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
- to install libraries to ``/usr/lib64``.
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
**LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
Building the llvm toolchain can use a lot of resources, particularly
@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
Defaults to "bin".
+**CMAKE_INSTALL_LIBDIR**:PATH
+ The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
+ Defaults to "lib".
+
**CMAKE_INSTALL_INCLUDEDIR**:PATH
The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
Defaults to "include".
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
index 370005cd8d7d..7e790bc52111 100644
--- a/tools/llvm-config/BuildVariables.inc.in
@ -120,10 +119,10 @@ index 370005cd8d7d..7e790bc52111 100644
#define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 2c6c55f89d38..f6d2068a0827 100644
index e86eb2b44b10..f63e207e792e 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -369,7 +369,11 @@ int main(int argc, char **argv) {
@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
sys::fs::make_absolute(ActivePrefix, Path);
ActiveBinDir = std::string(Path.str());
}

View File

@ -15,12 +15,3 @@ index 0242e0b75af3..d732011306f7 100644
for i, ln in enumerate(commands):
match = re.match(kPdbgRegex, ln)
if match:
@@ -1363,7 +1369,7 @@ def applySubstitutions(script, substitutions, conditions={},
return processed
process = processLine if recursion_limit is None else processLineToFixedPoint
-
+
return [unescapePercents(process(ln)) for ln in script]

View File

@ -10,23 +10,23 @@ index 81e8dc04acea..479ff95681e2 100644
import subprocess
import lit.formats
@@ -55,3 +56,26 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
@@ -55,3 +56,26 @@ if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):
# Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ:
config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE']
if sys.platform == "win32" and "SYSTEMDRIVE" in os.environ:
config.environment["SYSTEMDRIVE"] = os.environ["SYSTEMDRIVE"]
+
+# Add the LLVM dynamic libs to the platform-specific loader search path env var:
+#
+# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
+def find_shlibpath_var():
+ if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
+ yield 'LD_LIBRARY_PATH'
+ elif platform.system() == 'Darwin':
+ yield 'DYLD_LIBRARY_PATH'
+ elif platform.system() == 'Windows':
+ yield 'PATH'
+ elif platform.system() == 'AIX':
+ yield 'LIBPATH'
+ if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
+ yield "LD_LIBRARY_PATH"
+ elif platform.system() == "Darwin":
+ yield "DYLD_LIBRARY_PATH"
+ elif platform.system() == "Windows":
+ yield "PATH"
+ elif platform.system() == "AIX":
+ yield "LIBPATH"
+
+for shlibpath_var in find_shlibpath_var():
+ shlibpath = os.path.pathsep.join(
@ -41,22 +41,22 @@ diff --git a/test/lit.cfg.py b/test/lit.cfg.py
index 75a38b4c5dad..856fc75c9d74 100644
--- a/test/lit.cfg.py
+++ b/test/lit.cfg.py
@@ -42,6 +42,26 @@ llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
@@ -42,6 +42,26 @@ llvm_config.with_environment("PATH", config.llvm_tools_dir, append_path=True)
llvm_config.with_system_environment(
['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP'])
["HOME", "INCLUDE", "LIB", "TMP", "TEMP"])
+# Add the LLVM dynamic libs to the platform-specific loader search path env var:
+#
+# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
+def find_shlibpath_var():
+ if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
+ yield 'LD_LIBRARY_PATH'
+ elif platform.system() == 'Darwin':
+ yield 'DYLD_LIBRARY_PATH'
+ elif platform.system() == 'Windows':
+ yield 'PATH'
+ elif platform.system() == 'AIX':
+ yield 'LIBPATH'
+ if platform.system() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "SunOS"]:
+ yield "LD_LIBRARY_PATH"
+ elif platform.system() == "Darwin":
+ yield "DYLD_LIBRARY_PATH"
+ elif platform.system() == "Windows":
+ yield "PATH"
+ elif platform.system() == "AIX":
+ yield "LIBPATH"
+
+for shlibpath_var in find_shlibpath_var():
+ shlibpath = config.llvm_shlib_dir
@ -67,13 +67,14 @@ index 75a38b4c5dad..856fc75c9d74 100644
+ .format(platform.system()))
# Set up OCAMLPATH to include newly built OCaml libraries.
top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml')
top_ocaml_lib = os.path.join(config.llvm_lib_dir, "ocaml")
@@ -318,7 +338,7 @@ def have_cxx_shared_library():
try:
readobj_cmd = subprocess.Popen(
- [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE)
+ [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE, env=config.environment)
- [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE
+ [readobj_exe, "--needed-libs", readobj_exe], stdout=subprocess.PIPE, env=config.environment
)
except OSError:
print('could not exec llvm-readobj')
return False
print("could not exec llvm-readobj")

View File

@ -11,6 +11,7 @@
, clang-unwrapped
, perl
, pkg-config
, xcbuild
, version
}:
@ -39,6 +40,8 @@ stdenv.mkDerivation rec {
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
];
nativeCheckInputs = lib.optional stdenv.hostPlatform.isDarwin xcbuild.xcrun;
# Unsup:Pass:XFail:Fail
# 26:267:16:8
doCheck = false;

View File

@ -1,5 +1,5 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
index ce66214822a2..6ab7b33c95da 100644
index 630947abec7e..9f032dc7bd3f 100644
--- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -27,10 +27,10 @@ endif()
@ -8,11 +8,10 @@ index ce66214822a2..6ab7b33c95da 100644
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
- NO_DEFAULT_PATH)
find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ )
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT PACKAGER_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}")
return()

View File

@ -1,12 +0,0 @@
diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake
--- a/cmake/OpenMPTesting.cmake
+++ b/cmake/OpenMPTesting.cmake
@@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment)
if (${OPENMP_STANDALONE_BUILD})
set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
add_custom_target(${target}
- COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
+ COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
COMMENT ${comment}
DEPENDS ${ARG_DEPENDS}
USES_TERMINAL

View File

@ -8,11 +8,11 @@ assert odbcSupport -> unixODBC != null;
stdenv.mkDerivation rec {
pname = "freetds";
version = "1.4.6";
version = "1.4.8";
src = fetchurl {
url = "https://www.freetds.org/files/stable/${pname}-${version}.tar.bz2";
hash = "sha256-gTgCoca8Av4WlrbqMapTUiVxl3dza1v8I6OheFiVasA=";
hash = "sha256-KzXaLxxmxUrE9uQD2zpKuYOhLpi4a7xMgiZxaf+Tq2k=";
};
buildInputs = [

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "libmediainfo";
version = "23.10";
version = "23.11";
src = fetchurl {
url = "https://mediaarea.net/download/source/libmediainfo/${version}/libmediainfo_${version}.tar.xz";
hash = "sha256-duvlAuDzELVZ1d2Qcn2ar9X6uq7KNELzjmKd/AfaDSI=";
hash = "sha256-GX5U/MeePA1d9EqPWNxOAYvC+F0T+jvtVK89xW1ehT0=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];

View File

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "libva-utils";
version = "2.20.0";
version = "2.20.1";
src = fetchFromGitHub {
owner = "intel";
repo = "libva-utils";
rev = version;
sha256 = "sha256-oW4vIGgSs5lzmuloCFJPXTmsfH9Djz2KTlsjrOkaT5I=";
sha256 = "sha256-ZX6ahKnOB5ZEg36iIWskq3q26GVg/trsCAKKttEKZ1s=";
};
nativeBuildInputs = [ meson ninja pkg-config ];

View File

@ -11,13 +11,13 @@
stdenv.mkDerivation rec {
pname = "symengine";
version = "0.10.1";
version = "0.11.1";
src = fetchFromGitHub {
owner = "symengine";
repo = "symengine";
rev = "v${version}";
hash = "sha256-qTu0vS9K6rrr/0SXKpGC9P1QSN/AN7hyO/4DrGvhxWM=";
hash = "sha256-TB6wZnPZ16k8N8r0F6x+363zlTCJbM4HsKLvMZy1uYA=";
};
nativeBuildInputs = [ cmake ];

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "xeus";
version = "3.1.3";
version = "3.1.4";
src = fetchFromGitHub {
owner = "jupyter-xeus";
repo = pname;
rev = version;
sha256 = "sha256-kGIVcsgLG6weNfBwgEVTMa8NA9MXSztzi9ML5/gDqAQ=";
sha256 = "sha256-1QaMACLqTWC74V7l2LHLUMN/s/N4kNrE7+Ny1wkbavs=";
};
nativeBuildInputs = [

View File

@ -10,12 +10,12 @@
buildPythonPackage rec {
pname = "a2wsgi";
version = "1.8.0";
version = "1.9.0";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-sgQ2uS8z25/xQ2vmS4boLhhwluu10aUt4nlKcNuYFRA=";
hash = "sha256-cd/UGOUbnoI1nrRZx+2hTtg/j0ClD0dKbXNXpnHNPl4=";
};
nativeBuildInputs = [

View File

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "asf-search";
version = "6.6.3";
version = "6.7.1";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "asfadmin";
repo = "Discovery-asf_search";
rev = "refs/tags/v${version}";
hash = "sha256-w4xpCqNal0BHsmf1cL4k/DKzs/e9WQXTQNJNs8puJUU=";
hash = "sha256-Gks2PsHqwQqH6CcLc9yF2eAeOwncCPzEphbvR2t3j3Q=";
};
propagatedBuildInputs = [

View File

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "dbt-redshift";
version = "1.6.1";
version = "1.7.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "dbt-labs";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-5sgge55BwvC00Gj3UvLS/uzCgNSi4j4YdVlg/LuJI+s=";
hash = "sha256-wonwDrRvfX5/0yQXL05SDLutXFAAyLmhtpI0rm01AOg=";
};
nativeBuildInputs = [

View File

@ -7,14 +7,14 @@
buildPythonPackage rec {
pname = "django-reversion";
version = "5.0.6";
version = "5.0.8";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-buJalwcN2hTz4IK4uZm/vstKnwgv8fhR40TQVqGMk0w=";
hash = "sha256-RdN4vG5gbfayrQB3rsiwoA418Yx0yioa6cwmLOsy+5o=";
};
propagatedBuildInputs = [

View File

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "django-taggit";
version = "4.0.0";
version = "5.0.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-TVLenTckWpufmMDscf3M8dIoPjjohm1Ap65qO2eHoWE=";
hash = "sha256-7c19seDzXDBOCCovYx3awuFu9SlgKVJOt5KvdDDKtMw=";
};
propagatedBuildInputs = [

View File

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "dnf4";
version = "4.18.1";
version = "4.18.2";
format = "other";
outputs = [ "out" "man" ];
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "rpm-software-management";
repo = "dnf";
rev = version;
hash = "sha256-pgS4y87HbFiaS+fftdhKHOZAl2hYTUds3XVXUuQN6tU=";
hash = "sha256-WOLVKsrHp0V0wMXXRf1hrxsxuVv2bFOKIw8Aitz0cac=";
};
patches = [

View File

@ -20,7 +20,7 @@
buildPythonPackage rec {
pname = "emborg";
version = "1.37";
version = "1.38";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -29,7 +29,7 @@ buildPythonPackage rec {
owner = "KenKundert";
repo = "emborg";
rev = "refs/tags/v${version}";
hash = "sha256-bHYs+vlNku/T5Hb9u77Xml9/FNj5vgqPeXSzcilsS+I=";
hash = "sha256-dK/6y1cjegomiy3fta2grUm4T0ZrylmstXfkJo4mDCE=";
};
nativeBuildInputs = [

View File

@ -10,16 +10,16 @@
buildPythonPackage rec {
pname = "flask-mailman";
version = "0.3.0";
version = "1.0.0";
format = "pyproject";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "waynerv";
repo = pname;
rev = "v${version}";
hash = "sha256-cfLtif+48M6fqOkBbi4PJRFpf9FRXCPesktFQky34eU=";
rev = "refs/tags/v${version}";
hash = "sha256-wfbMz9k9cy9m95mc0Y0lqmpJczrfjhmumO31gRQy704=";
};
nativeBuildInputs = [

View File

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "glean-parser";
version = "9.0.0";
version = "10.0.3";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -23,7 +23,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "glean_parser";
inherit version;
hash = "sha256-dwBKds89CaanZA4b5I6u01Q2s23joQp5SOCjdTXn/Xc=";
hash = "sha256-1XNZYp0pX57lcAaKKEaWaJLj/ttyIlnsvNjMN20pm1E=";
};
postPatch = ''

View File

@ -14,14 +14,14 @@
buildPythonPackage rec {
pname = "google-cloud-dataproc";
version = "5.6.0";
version = "5.7.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-X6nfuIQzwtDBOLfrtq3hdBA743YszQObJNU8dEjjdg0=";
hash = "sha256-CGIpoPmHRIu5ICnhZiEqzvhdTo5dlPKCKt0hs4K/HAQ=";
};
propagatedBuildInputs = [
@ -50,7 +50,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Google Cloud Dataproc API client library";
homepage = "https://github.com/googleapis/python-dataproc";
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-dataproc";
changelog = "https://github.com/googleapis/google-cloud-python/blob/google-cloud-dataproc-v${version}/packages/google-cloud-dataproc/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ ];

Some files were not shown because too many files have changed in this diff Show More