nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

Merge staging-next into staging

authored by

nixpkgs-ci[bot] and committed by
GitHub
264b97ec 863612f3

+1872 -7676
+1 -1
.github/labeler.yml
··· 393 393 - changed-files: 394 394 - any-glob-to-any-file: 395 395 - nixos/modules/services/desktops/pantheon/**/* 396 - - nixos/modules/services/x11/desktop-managers/pantheon.nix 396 + - nixos/modules/services/desktop-managers/pantheon.nix 397 397 - nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix 398 398 - nixos/tests/pantheon.nix 399 399 - pkgs/desktops/pantheon/**/*
+1 -1
.github/workflows/backport.yml
··· 27 27 steps: 28 28 # Use a GitHub App to create the PR so that CI gets triggered 29 29 # The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs 30 - - uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 30 + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 31 31 id: app-token 32 32 with: 33 33 app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
+1 -1
.github/workflows/check.yml
··· 109 109 - name: Build codeowners validator 110 110 run: nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A codeownersValidator 111 111 112 - - uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 112 + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 113 113 if: github.event_name == 'pull_request_target' && vars.OWNER_RO_APP_ID 114 114 id: app-token 115 115 with:
+1 -1
.github/workflows/edited.yml
··· 36 36 # Use a GitHub App to create the PR so that CI gets triggered 37 37 # The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs 38 38 # We only need Pull Requests: write here, but the app is also used for backports. 39 - - uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 39 + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 40 40 id: app-token 41 41 with: 42 42 app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
+1 -1
.github/workflows/labels.yml
··· 49 49 run: npm install @actions/artifact bottleneck 50 50 51 51 # Use a GitHub App, because it has much higher rate limits: 12,500 instead of 5,000 req / hour. 52 - - uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 52 + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 53 53 if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_APP_ID 54 54 id: app-token 55 55 with:
+1 -1
.github/workflows/periodic-merge.yml
··· 23 23 steps: 24 24 # Use a GitHub App to create the PR so that CI gets triggered 25 25 # The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs 26 - - uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 26 + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 27 27 id: app-token 28 28 with: 29 29 app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
+1 -1
.github/workflows/reviewers.yml
··· 48 48 # - OWNER_APP_PRIVATE_KEY (secret) 49 49 # 50 50 # Can't use the token received from permissions above, because it can't get enough permissions. 51 - - uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1 51 + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 52 52 if: github.event_name == 'pull_request_target' && vars.OWNER_APP_ID 53 53 id: app-token 54 54 with:
+2
doc/release-notes/rl-2511.section.md
··· 26 26 27 27 - GCC 9, 10, 11, and 12 have been removed, as they have reached end‐of‐life upstream and are no longer supported. 28 28 29 + - LLVM 12, 13, 14, 15, 16, and 17 have been removed, as they have reached end‐of‐life upstream and are no longer supported. 30 + 29 31 - GHCJS 8.10, exposed via `haskell.compiler.ghcjs` and `haskell.compiler.ghcjs810`, has been removed. Downstream users should migrate their projects to the new JavaScript backend of GHC proper which can be used via `pkgsCross.ghcjs` from Nixpkgs. Haskell packaging code, like `haskellPackages.mkDerivation`, `ghcWithPackages` and `hoogleWithPackages`, also no longer supports GHCJS. 30 32 31 33 - GHC 8.6, 8.10, 9.0, 9.2, and their package sets have been removed.
+8
maintainers/maintainer-list.nix
··· 7103 7103 githubId = 2025623; 7104 7104 name = "Luc Chabassier"; 7105 7105 }; 7106 + dwoffinden = { 7107 + email = "daw@hey.com"; 7108 + github = "dwoffinden"; 7109 + githubId = 1432131; 7110 + keys = [ { fingerprint = "46FC 889E BC38 100E 51E8 3245 F3EA 503B 360F BD40"; } ]; 7111 + matrix = "@dwoffinden:matrix.org"; 7112 + name = "Daniel Woffinden"; 7113 + }; 7106 7114 dwrege = { 7107 7115 email = "email@dwrege.de"; 7108 7116 github = "DominicWrege";
+1 -1
nixos/doc/manual/release-notes/rl-2003.section.md
··· 38 38 39 39 - GNOME 3 has been upgraded to 3.34. Please take a look at their [Release Notes](https://help.gnome.org/misc/release-notes/3.34) for details. 40 40 41 - - If you enable the Pantheon Desktop Manager via [services.xserver.desktopManager.pantheon.enable](options.html#opt-services.xserver.desktopManager.pantheon.enable), we now default to also use [ Pantheon's newly designed greeter ](https://blog.elementary.io/say-hello-to-the-new-greeter/). Contrary to NixOS's usual update policy, Pantheon will receive updates during the cycle of NixOS 20.03 when backwards compatible. 41 + - If you enable the Pantheon Desktop Manager via `services.xserver.desktopManager.pantheon.enable`, we now default to also use [ Pantheon's newly designed greeter ](https://blog.elementary.io/say-hello-to-the-new-greeter/). Contrary to NixOS's usual update policy, Pantheon will receive updates during the cycle of NixOS 20.03 when backwards compatible. 42 42 43 43 - By default zfs pools will now be trimmed on a weekly basis. Trimming is only done on supported devices (i.e. NVME or SSDs) and should improve throughput and lifetime of these devices. It is controlled by the `services.zfs.trim.enable` varname. The zfs scrub service (`services.zfs.autoScrub.enable`) and the zfs autosnapshot service (`services.zfs.autoSnapshot.enable`) are now only enabled if zfs is set in `config.boot.initrd.supportedFilesystems` or `config.boot.supportedFilesystems`. These lists will automatically contain zfs as soon as any zfs mountpoint is configured in `fileSystems`. 44 44
+2
nixos/doc/manual/release-notes/rl-2511.section.md
··· 248 248 249 249 - mate-wayland-session 1.28.4 is now using the default wayfire decorator instead of firedecor, thus `services.xserver.desktopManager.mate.enableWaylandSession` is no longer shipping firedecor. If you are experiencing broken window decorations after upgrade, backup and remove `~/.config/mate/wayfire.ini` and re-login. 250 250 251 + - Due to [deprecation of gnome-session X11 support](https://blogs.gnome.org/alatiera/2025/06/08/the-x11-session-removal/), `services.desktopManager.pantheon` now defaults to pantheon-wayland session. The X11 session will be removed before gnome-session 49 lands. 252 + 251 253 - `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server. 252 254 253 255 - `networking.wireless.networks.<name>` now has an option to specify SSID, hence allowing duplicated SSID setup. The BSSID option is added along side with this.
+72
nixos/modules/services/desktop-managers/pantheon.md
··· 1 + # Pantheon Desktop {#chap-pantheon} 2 + 3 + Pantheon is the desktop environment created for the elementary OS distribution. It is written from scratch in Vala, utilizing GNOME technologies with GTK and Granite. 4 + 5 + ## Enabling Pantheon {#sec-pantheon-enable} 6 + 7 + All of Pantheon is working in NixOS and the applications should be available, aside from a few [exceptions](https://github.com/NixOS/nixpkgs/issues/58161). To enable Pantheon, set 8 + ```nix 9 + { services.desktopManager.pantheon.enable = true; } 10 + ``` 11 + This automatically enables LightDM and Pantheon's LightDM greeter. If you'd like to disable this, set 12 + ```nix 13 + { 14 + services.xserver.displayManager.lightdm.greeters.pantheon.enable = false; 15 + services.xserver.displayManager.lightdm.enable = false; 16 + } 17 + ``` 18 + but please be aware using Pantheon without LightDM as a display manager will break screenlocking from the UI. The NixOS module for Pantheon installs all of Pantheon's default applications. If you'd like to not install Pantheon's apps, set 19 + ```nix 20 + { services.pantheon.apps.enable = false; } 21 + ``` 22 + You can also use [](#opt-environment.pantheon.excludePackages) to remove any other app (like `elementary-mail`). 23 + 24 + ## Wingpanel and Switchboard plugins {#sec-pantheon-wingpanel-switchboard} 25 + 26 + Wingpanel and Switchboard work differently than they do in other distributions, as far as using plugins. You cannot install a plugin globally (like with {option}`environment.systemPackages`) to start using it. You should instead be using the following options: 27 + 28 + - [](#opt-services.desktopManager.pantheon.extraWingpanelIndicators) 29 + - [](#opt-services.desktopManager.pantheon.extraSwitchboardPlugs) 30 + 31 + to configure the programs with plugs or indicators. 32 + 33 + The difference in NixOS is both these programs are patched to load plugins from a directory that is the value of an environment variable. All of which is controlled in Nix. If you need to configure the particular packages manually you can override the packages like: 34 + ```nix 35 + wingpanel-with-indicators.override { 36 + indicators = [ pkgs.some-special-indicator ]; 37 + } 38 + ``` 39 + ```nix 40 + switchboard-with-plugs.override { plugs = [ pkgs.some-special-plug ]; } 41 + ``` 42 + please note that, like how the NixOS options describe these as extra plugins, this would only add to the default plugins included with the programs. If for some reason you'd like to configure which plugins to use exactly, both packages have an argument for this: 43 + ```nix 44 + wingpanel-with-indicators.override { 45 + useDefaultIndicators = false; 46 + indicators = specialListOfIndicators; 47 + } 48 + ``` 49 + ```nix 50 + switchboard-with-plugs.override { 51 + useDefaultPlugs = false; 52 + plugs = specialListOfPlugs; 53 + } 54 + ``` 55 + this could be most useful for testing a particular plug-in in isolation. 56 + 57 + ## FAQ {#sec-pantheon-faq} 58 + 59 + [I have switched from a different desktop and Pantheon’s theming looks messed up.]{#sec-pantheon-faq-messed-up-theme} 60 + : Open Switchboard and go to: Administration → About → Restore Default Settings → Restore Settings. This will reset any dconf settings to their Pantheon defaults. Note this could reset certain GNOME specific preferences if that desktop was used prior. 61 + 62 + [I cannot enable both GNOME and Pantheon.]{#sec-pantheon-faq-gnome-and-pantheon} 63 + : This is a known [issue](https://github.com/NixOS/nixpkgs/issues/64611) and there is no known workaround. 64 + 65 + [Does AppCenter work, or is it available?]{#sec-pantheon-faq-appcenter} 66 + : AppCenter is available and the Flatpak backend should work so you can install some Flatpak applications using it. However, due to missing appstream metadata, the Packagekit backend does not function currently. See this [issue](https://github.com/NixOS/nixpkgs/issues/15932). 67 + 68 + If you are using Pantheon, AppCenter should be installed by default if you have [Flatpak support](#module-services-flatpak) enabled. If you also wish to add the `appcenter` Flatpak remote: 69 + 70 + ```ShellSession 71 + $ flatpak remote-add --if-not-exists appcenter https://flatpak.elementary.io/repo.flatpakrepo 72 + ```
+360
nixos/modules/services/desktop-managers/pantheon.nix
··· 1 + { 2 + config, 3 + lib, 4 + utils, 5 + pkgs, 6 + ... 7 + }: 8 + 9 + with lib; 10 + 11 + let 12 + 13 + cfg = config.services.desktopManager.pantheon; 14 + serviceCfg = config.services.pantheon; 15 + 16 + nixos-gsettings-desktop-schemas = pkgs.pantheon.elementary-gsettings-schemas.override { 17 + extraGSettingsOverridePackages = cfg.extraGSettingsOverridePackages; 18 + extraGSettingsOverrides = cfg.extraGSettingsOverrides; 19 + }; 20 + 21 + notExcluded = pkg: utils.disablePackageByName pkg config.environment.pantheon.excludePackages; 22 + in 23 + 24 + { 25 + 26 + meta = { 27 + doc = ./pantheon.md; 28 + maintainers = teams.pantheon.members; 29 + }; 30 + 31 + imports = [ 32 + (lib.mkRenamedOptionModule 33 + [ "services" "xserver" "desktopManager" "pantheon" ] 34 + [ "services" "desktopManager" "pantheon" ] 35 + ) 36 + ]; 37 + 38 + options = { 39 + 40 + services.pantheon = { 41 + 42 + contractor = { 43 + enable = mkEnableOption "contractor, a desktop-wide extension service used by Pantheon"; 44 + }; 45 + 46 + apps.enable = mkEnableOption "Pantheon default applications"; 47 + 48 + }; 49 + 50 + services.desktopManager.pantheon = { 51 + enable = mkOption { 52 + type = types.bool; 53 + default = false; 54 + description = "Enable the pantheon desktop manager"; 55 + }; 56 + 57 + sessionPath = mkOption { 58 + default = [ ]; 59 + type = types.listOf types.package; 60 + example = literalExpression "[ pkgs.gpaste ]"; 61 + description = '' 62 + Additional list of packages to be added to the session search path. 63 + Useful for GSettings-conditional autostart. 64 + 65 + Note that this should be a last resort; patching the package is preferred (see GPaste). 66 + ''; 67 + }; 68 + 69 + extraWingpanelIndicators = mkOption { 70 + default = null; 71 + type = with types; nullOr (listOf package); 72 + description = "Indicators to add to Wingpanel."; 73 + }; 74 + 75 + extraSwitchboardPlugs = mkOption { 76 + default = null; 77 + type = with types; nullOr (listOf package); 78 + description = "Plugs to add to Switchboard."; 79 + }; 80 + 81 + extraGSettingsOverrides = mkOption { 82 + default = ""; 83 + type = types.lines; 84 + description = "Additional gsettings overrides."; 85 + }; 86 + 87 + extraGSettingsOverridePackages = mkOption { 88 + default = [ ]; 89 + type = types.listOf types.path; 90 + description = "List of packages for which gsettings are overridden."; 91 + }; 92 + 93 + debug = mkEnableOption "gnome-session debug messages"; 94 + 95 + }; 96 + 97 + environment.pantheon.excludePackages = mkOption { 98 + default = [ ]; 99 + example = literalExpression "[ pkgs.pantheon.elementary-camera ]"; 100 + type = types.listOf types.package; 101 + description = "Which packages pantheon should exclude from the default environment"; 102 + }; 103 + 104 + }; 105 + 106 + config = mkMerge [ 107 + (mkIf cfg.enable { 108 + services.desktopManager.pantheon.sessionPath = utils.removePackagesByName [ 109 + pkgs.pantheon.pantheon-agent-geoclue2 110 + ] config.environment.pantheon.excludePackages; 111 + 112 + services.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ]; 113 + 114 + # Ensure lightdm is used when Pantheon is enabled 115 + # Without it screen locking will be nonfunctional because of the use of lightlocker 116 + warnings = optional (config.services.xserver.displayManager.lightdm.enable != true) '' 117 + Using Pantheon without LightDM as a displayManager will break screenlocking from the UI. 118 + ''; 119 + 120 + services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true; 121 + 122 + # Without this, elementary LightDM greeter will pre-select non-existent `default` session 123 + # https://github.com/elementary/greeter/issues/368 124 + services.displayManager.defaultSession = mkDefault "pantheon-wayland"; 125 + programs.dconf.profiles.user.databases = [ 126 + { 127 + settings."io/elementary/greeter" = { 128 + last-session-type = "pantheon-wayland"; 129 + }; 130 + } 131 + ]; 132 + 133 + environment.extraInit = '' 134 + ${concatMapStrings (p: '' 135 + if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then 136 + export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} 137 + fi 138 + 139 + if [ -d "${p}/lib/girepository-1.0" ]; then 140 + export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0 141 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib 142 + fi 143 + '') cfg.sessionPath} 144 + ''; 145 + 146 + # Default services 147 + hardware.bluetooth.enable = mkDefault true; 148 + security.polkit.enable = true; 149 + services.accounts-daemon.enable = true; 150 + services.colord.enable = mkDefault true; 151 + services.fwupd.enable = mkDefault true; 152 + # TODO: Enable once #177946 is resolved 153 + # services.packagekit.enable = mkDefault true; 154 + services.power-profiles-daemon.enable = mkDefault true; 155 + services.touchegg.enable = mkDefault true; 156 + services.touchegg.package = pkgs.pantheon.touchegg; 157 + services.tumbler.enable = mkDefault true; 158 + services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true)); 159 + services.dbus.packages = with pkgs.pantheon; [ 160 + switchboard-plug-power 161 + elementary-default-settings # accountsservice extensions 162 + ]; 163 + services.pantheon.apps.enable = mkDefault true; 164 + services.pantheon.contractor.enable = mkDefault true; 165 + services.gnome.at-spi2-core.enable = true; 166 + services.gnome.evolution-data-server.enable = true; 167 + services.gnome.glib-networking.enable = true; 168 + services.gnome.gnome-keyring.enable = true; 169 + services.gnome.gcr-ssh-agent.enable = mkDefault true; 170 + services.gvfs.enable = true; 171 + services.gnome.rygel.enable = mkDefault true; 172 + services.udisks2.enable = true; 173 + services.upower.enable = config.powerManagement.enable; 174 + services.libinput.enable = mkDefault true; 175 + services.switcherooControl.enable = mkDefault true; 176 + services.xserver.updateDbusEnvironment = true; 177 + services.zeitgeist.enable = mkDefault true; 178 + services.geoclue2.enable = mkDefault true; 179 + # pantheon has pantheon-agent-geoclue2 180 + services.geoclue2.enableDemoAgent = false; 181 + services.geoclue2.appConfig."io.elementary.desktop.agent-geoclue2" = { 182 + isAllowed = true; 183 + isSystem = true; 184 + }; 185 + services.udev.packages = [ 186 + pkgs.pantheon.gnome-settings-daemon 187 + # Force enable KMS modifiers for devices that require them. 188 + # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443 189 + pkgs.pantheon.mutter 190 + ]; 191 + services.orca.enable = mkDefault (notExcluded pkgs.orca); 192 + systemd.packages = with pkgs; [ 193 + gnome-session 194 + pantheon.gala 195 + pantheon.gnome-settings-daemon 196 + pantheon.elementary-session-settings 197 + ]; 198 + programs.dconf.enable = true; 199 + networking.networkmanager.enable = mkDefault true; 200 + 201 + systemd.user.targets."gnome-session-x11-services".wants = [ 202 + "org.gnome.SettingsDaemon.XSettings.service" 203 + ]; 204 + systemd.user.targets."gnome-session-x11-services-ready".wants = [ 205 + "org.gnome.SettingsDaemon.XSettings.service" 206 + ]; 207 + 208 + # Global environment 209 + environment.systemPackages = 210 + (with pkgs.pantheon; [ 211 + elementary-bluetooth-daemon 212 + elementary-session-settings 213 + elementary-settings-daemon 214 + gala 215 + gnome-settings-daemon 216 + (switchboard-with-plugs.override { 217 + plugs = cfg.extraSwitchboardPlugs; 218 + }) 219 + (wingpanel-with-indicators.override { 220 + indicators = cfg.extraWingpanelIndicators; 221 + }) 222 + ]) 223 + ++ utils.removePackagesByName ( 224 + (with pkgs; [ 225 + desktop-file-utils 226 + glib # for gsettings program 227 + gnome-menus 228 + adwaita-icon-theme 229 + gtk3.out # for gtk-launch program 230 + onboard 231 + sound-theme-freedesktop 232 + xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ 233 + ]) 234 + ++ (with pkgs.pantheon; [ 235 + # Artwork 236 + elementary-gtk-theme 237 + elementary-icon-theme 238 + elementary-sound-theme 239 + elementary-wallpapers 240 + 241 + # Desktop 242 + elementary-default-settings 243 + elementary-dock 244 + elementary-shortcut-overlay 245 + 246 + # Services 247 + elementary-capnet-assist 248 + elementary-notifications 249 + pantheon-agent-geoclue2 250 + pantheon-agent-polkit 251 + ]) 252 + ) config.environment.pantheon.excludePackages; 253 + 254 + # Settings from elementary-default-settings 255 + # GTK4 will try both $XDG_CONFIG_DIRS/gtk-4.0 and ${gtk4}/etc/gtk-4.0, but not /etc/gtk-4.0. 256 + environment.etc."xdg/gtk-4.0/settings.ini".source = 257 + "${pkgs.pantheon.elementary-default-settings}/etc/gtk-4.0/settings.ini"; 258 + 259 + xdg.mime.enable = true; 260 + xdg.icons.enable = true; 261 + 262 + xdg.portal.enable = true; 263 + xdg.portal.extraPortals = [ 264 + pkgs.xdg-desktop-portal-gtk 265 + ] 266 + ++ (with pkgs.pantheon; [ 267 + elementary-files 268 + elementary-settings-daemon 269 + xdg-desktop-portal-pantheon 270 + ]); 271 + 272 + xdg.portal.configPackages = mkDefault [ pkgs.pantheon.elementary-default-settings ]; 273 + 274 + # Override GSettings schemas 275 + environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; 276 + 277 + environment.sessionVariables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1"; 278 + 279 + environment.pathsToLink = [ 280 + # FIXME: modules should link subdirs of `/share` rather than relying on this 281 + "/share" 282 + ]; 283 + 284 + # Otherwise you can't store NetworkManager Secrets with 285 + # "Store the password only for this user" 286 + programs.nm-applet.enable = true; 287 + # Pantheon has its own network indicator 288 + programs.nm-applet.indicator = false; 289 + 290 + # Shell integration for VTE terminals 291 + programs.bash.vteIntegration = mkDefault true; 292 + programs.zsh.vteIntegration = mkDefault true; 293 + 294 + # Default Fonts 295 + fonts.packages = with pkgs; [ 296 + inter 297 + open-dyslexic 298 + open-sans 299 + roboto-mono 300 + ]; 301 + 302 + fonts.fontconfig.defaultFonts = { 303 + monospace = [ "Roboto Mono" ]; 304 + sansSerif = [ "Inter" ]; 305 + }; 306 + }) 307 + 308 + (mkIf serviceCfg.apps.enable { 309 + programs.evince.enable = mkDefault (notExcluded pkgs.evince); 310 + programs.file-roller.enable = mkDefault (notExcluded pkgs.file-roller); 311 + 312 + environment.systemPackages = utils.removePackagesByName ( 313 + [ 314 + pkgs.gnome-font-viewer 315 + ] 316 + ++ ( 317 + with pkgs.pantheon; 318 + [ 319 + elementary-calculator 320 + elementary-calendar 321 + elementary-camera 322 + elementary-code 323 + elementary-files 324 + elementary-mail 325 + elementary-music 326 + elementary-photos 327 + elementary-screenshot 328 + elementary-tasks 329 + elementary-terminal 330 + elementary-videos 331 + epiphany 332 + ] 333 + ++ lib.optionals config.services.flatpak.enable [ 334 + # Only install appcenter if flatpak is enabled before 335 + # https://github.com/NixOS/nixpkgs/issues/15932 is resolved. 336 + appcenter 337 + sideload 338 + ] 339 + ) 340 + ) config.environment.pantheon.excludePackages; 341 + 342 + # needed by screenshot 343 + fonts.packages = [ 344 + pkgs.pantheon.elementary-redacted-script 345 + ]; 346 + }) 347 + 348 + (mkIf serviceCfg.contractor.enable { 349 + environment.systemPackages = with pkgs.pantheon; [ 350 + contractor 351 + file-roller-contract 352 + ]; 353 + 354 + environment.pathsToLink = [ 355 + "/share/contractor" 356 + ]; 357 + }) 358 + 359 + ]; 360 + }
+3 -3
nixos/modules/services/networking/umurmur.nix
··· 53 53 let 54 54 valueType = 55 55 with lib.types; 56 - oneOf [ 56 + (attrsOf (oneOf [ 57 57 bool 58 58 int 59 59 float 60 60 str 61 61 path 62 - (listOf (attrsOf valueType)) 63 - ] 62 + (listOf valueType) 63 + ])) 64 64 // { 65 65 description = "uMurmur config value"; 66 66 };
+1 -1
nixos/modules/services/x11/desktop-managers/default.nix
··· 33 33 ./retroarch.nix 34 34 ./kodi.nix 35 35 ./mate.nix 36 - ./pantheon.nix 36 + ../../desktop-managers/pantheon.nix 37 37 ./surf-display.nix 38 38 ./cde.nix 39 39 ./cinnamon.nix
-72
nixos/modules/services/x11/desktop-managers/pantheon.md
··· 1 - # Pantheon Desktop {#chap-pantheon} 2 - 3 - Pantheon is the desktop environment created for the elementary OS distribution. It is written from scratch in Vala, utilizing GNOME technologies with GTK and Granite. 4 - 5 - ## Enabling Pantheon {#sec-pantheon-enable} 6 - 7 - All of Pantheon is working in NixOS and the applications should be available, aside from a few [exceptions](https://github.com/NixOS/nixpkgs/issues/58161). To enable Pantheon, set 8 - ```nix 9 - { services.xserver.desktopManager.pantheon.enable = true; } 10 - ``` 11 - This automatically enables LightDM and Pantheon's LightDM greeter. If you'd like to disable this, set 12 - ```nix 13 - { 14 - services.xserver.displayManager.lightdm.greeters.pantheon.enable = false; 15 - services.xserver.displayManager.lightdm.enable = false; 16 - } 17 - ``` 18 - but please be aware using Pantheon without LightDM as a display manager will break screenlocking from the UI. The NixOS module for Pantheon installs all of Pantheon's default applications. If you'd like to not install Pantheon's apps, set 19 - ```nix 20 - { services.pantheon.apps.enable = false; } 21 - ``` 22 - You can also use [](#opt-environment.pantheon.excludePackages) to remove any other app (like `elementary-mail`). 23 - 24 - ## Wingpanel and Switchboard plugins {#sec-pantheon-wingpanel-switchboard} 25 - 26 - Wingpanel and Switchboard work differently than they do in other distributions, as far as using plugins. You cannot install a plugin globally (like with {option}`environment.systemPackages`) to start using it. You should instead be using the following options: 27 - 28 - - [](#opt-services.xserver.desktopManager.pantheon.extraWingpanelIndicators) 29 - - [](#opt-services.xserver.desktopManager.pantheon.extraSwitchboardPlugs) 30 - 31 - to configure the programs with plugs or indicators. 32 - 33 - The difference in NixOS is both these programs are patched to load plugins from a directory that is the value of an environment variable. All of which is controlled in Nix. If you need to configure the particular packages manually you can override the packages like: 34 - ```nix 35 - wingpanel-with-indicators.override { 36 - indicators = [ pkgs.some-special-indicator ]; 37 - } 38 - ``` 39 - ```nix 40 - switchboard-with-plugs.override { plugs = [ pkgs.some-special-plug ]; } 41 - ``` 42 - please note that, like how the NixOS options describe these as extra plugins, this would only add to the default plugins included with the programs. If for some reason you'd like to configure which plugins to use exactly, both packages have an argument for this: 43 - ```nix 44 - wingpanel-with-indicators.override { 45 - useDefaultIndicators = false; 46 - indicators = specialListOfIndicators; 47 - } 48 - ``` 49 - ```nix 50 - switchboard-with-plugs.override { 51 - useDefaultPlugs = false; 52 - plugs = specialListOfPlugs; 53 - } 54 - ``` 55 - this could be most useful for testing a particular plug-in in isolation. 56 - 57 - ## FAQ {#sec-pantheon-faq} 58 - 59 - [I have switched from a different desktop and Pantheon’s theming looks messed up.]{#sec-pantheon-faq-messed-up-theme} 60 - : Open Switchboard and go to: Administration → About → Restore Default Settings → Restore Settings. This will reset any dconf settings to their Pantheon defaults. Note this could reset certain GNOME specific preferences if that desktop was used prior. 61 - 62 - [I cannot enable both GNOME and Pantheon.]{#sec-pantheon-faq-gnome-and-pantheon} 63 - : This is a known [issue](https://github.com/NixOS/nixpkgs/issues/64611) and there is no known workaround. 64 - 65 - [Does AppCenter work, or is it available?]{#sec-pantheon-faq-appcenter} 66 - : AppCenter is available and the Flatpak backend should work so you can install some Flatpak applications using it. However, due to missing appstream metadata, the Packagekit backend does not function currently. See this [issue](https://github.com/NixOS/nixpkgs/issues/15932). 67 - 68 - If you are using Pantheon, AppCenter should be installed by default if you have [Flatpak support](#module-services-flatpak) enabled. If you also wish to add the `appcenter` Flatpak remote: 69 - 70 - ```ShellSession 71 - $ flatpak remote-add --if-not-exists appcenter https://flatpak.elementary.io/repo.flatpakrepo 72 - ```
-346
nixos/modules/services/x11/desktop-managers/pantheon.nix
··· 1 - { 2 - config, 3 - lib, 4 - utils, 5 - pkgs, 6 - ... 7 - }: 8 - 9 - with lib; 10 - 11 - let 12 - 13 - cfg = config.services.xserver.desktopManager.pantheon; 14 - serviceCfg = config.services.pantheon; 15 - 16 - nixos-gsettings-desktop-schemas = pkgs.pantheon.elementary-gsettings-schemas.override { 17 - extraGSettingsOverridePackages = cfg.extraGSettingsOverridePackages; 18 - extraGSettingsOverrides = cfg.extraGSettingsOverrides; 19 - }; 20 - 21 - notExcluded = pkg: utils.disablePackageByName pkg config.environment.pantheon.excludePackages; 22 - in 23 - 24 - { 25 - 26 - meta = { 27 - doc = ./pantheon.md; 28 - maintainers = teams.pantheon.members; 29 - }; 30 - 31 - options = { 32 - 33 - services.pantheon = { 34 - 35 - contractor = { 36 - enable = mkEnableOption "contractor, a desktop-wide extension service used by Pantheon"; 37 - }; 38 - 39 - apps.enable = mkEnableOption "Pantheon default applications"; 40 - 41 - }; 42 - 43 - services.xserver.desktopManager.pantheon = { 44 - enable = mkOption { 45 - type = types.bool; 46 - default = false; 47 - description = "Enable the pantheon desktop manager"; 48 - }; 49 - 50 - sessionPath = mkOption { 51 - default = [ ]; 52 - type = types.listOf types.package; 53 - example = literalExpression "[ pkgs.gpaste ]"; 54 - description = '' 55 - Additional list of packages to be added to the session search path. 56 - Useful for GSettings-conditional autostart. 57 - 58 - Note that this should be a last resort; patching the package is preferred (see GPaste). 59 - ''; 60 - }; 61 - 62 - extraWingpanelIndicators = mkOption { 63 - default = null; 64 - type = with types; nullOr (listOf package); 65 - description = "Indicators to add to Wingpanel."; 66 - }; 67 - 68 - extraSwitchboardPlugs = mkOption { 69 - default = null; 70 - type = with types; nullOr (listOf package); 71 - description = "Plugs to add to Switchboard."; 72 - }; 73 - 74 - extraGSettingsOverrides = mkOption { 75 - default = ""; 76 - type = types.lines; 77 - description = "Additional gsettings overrides."; 78 - }; 79 - 80 - extraGSettingsOverridePackages = mkOption { 81 - default = [ ]; 82 - type = types.listOf types.path; 83 - description = "List of packages for which gsettings are overridden."; 84 - }; 85 - 86 - debug = mkEnableOption "gnome-session debug messages"; 87 - 88 - }; 89 - 90 - environment.pantheon.excludePackages = mkOption { 91 - default = [ ]; 92 - example = literalExpression "[ pkgs.pantheon.elementary-camera ]"; 93 - type = types.listOf types.package; 94 - description = "Which packages pantheon should exclude from the default environment"; 95 - }; 96 - 97 - }; 98 - 99 - config = mkMerge [ 100 - (mkIf cfg.enable { 101 - services.xserver.desktopManager.pantheon.sessionPath = utils.removePackagesByName [ 102 - pkgs.pantheon.pantheon-agent-geoclue2 103 - ] config.environment.pantheon.excludePackages; 104 - 105 - services.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ]; 106 - 107 - # Ensure lightdm is used when Pantheon is enabled 108 - # Without it screen locking will be nonfunctional because of the use of lightlocker 109 - warnings = optional (config.services.xserver.displayManager.lightdm.enable != true) '' 110 - Using Pantheon without LightDM as a displayManager will break screenlocking from the UI. 111 - ''; 112 - 113 - services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true; 114 - 115 - # Without this, elementary LightDM greeter will pre-select non-existent `default` session 116 - # https://github.com/elementary/greeter/issues/368 117 - services.displayManager.defaultSession = mkDefault "pantheon"; 118 - 119 - environment.extraInit = '' 120 - ${concatMapStrings (p: '' 121 - if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then 122 - export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} 123 - fi 124 - 125 - if [ -d "${p}/lib/girepository-1.0" ]; then 126 - export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0 127 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib 128 - fi 129 - '') cfg.sessionPath} 130 - ''; 131 - 132 - # Default services 133 - hardware.bluetooth.enable = mkDefault true; 134 - security.polkit.enable = true; 135 - services.accounts-daemon.enable = true; 136 - services.colord.enable = mkDefault true; 137 - services.fwupd.enable = mkDefault true; 138 - # TODO: Enable once #177946 is resolved 139 - # services.packagekit.enable = mkDefault true; 140 - services.power-profiles-daemon.enable = mkDefault true; 141 - services.touchegg.enable = mkDefault true; 142 - services.touchegg.package = pkgs.pantheon.touchegg; 143 - services.tumbler.enable = mkDefault true; 144 - services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true)); 145 - services.dbus.packages = with pkgs.pantheon; [ 146 - switchboard-plug-power 147 - elementary-default-settings # accountsservice extensions 148 - ]; 149 - services.pantheon.apps.enable = mkDefault true; 150 - services.pantheon.contractor.enable = mkDefault true; 151 - services.gnome.at-spi2-core.enable = true; 152 - services.gnome.evolution-data-server.enable = true; 153 - services.gnome.glib-networking.enable = true; 154 - services.gnome.gnome-keyring.enable = true; 155 - services.gnome.gcr-ssh-agent.enable = mkDefault true; 156 - services.gvfs.enable = true; 157 - services.gnome.rygel.enable = mkDefault true; 158 - services.udisks2.enable = true; 159 - services.upower.enable = config.powerManagement.enable; 160 - services.libinput.enable = mkDefault true; 161 - services.switcherooControl.enable = mkDefault true; 162 - services.xserver.updateDbusEnvironment = true; 163 - services.zeitgeist.enable = mkDefault true; 164 - services.geoclue2.enable = mkDefault true; 165 - # pantheon has pantheon-agent-geoclue2 166 - services.geoclue2.enableDemoAgent = false; 167 - services.geoclue2.appConfig."io.elementary.desktop.agent-geoclue2" = { 168 - isAllowed = true; 169 - isSystem = true; 170 - }; 171 - services.udev.packages = [ 172 - pkgs.pantheon.gnome-settings-daemon 173 - # Force enable KMS modifiers for devices that require them. 174 - # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443 175 - pkgs.pantheon.mutter 176 - ]; 177 - services.orca.enable = mkDefault (notExcluded pkgs.orca); 178 - systemd.packages = with pkgs; [ 179 - gnome-session 180 - pantheon.gala 181 - pantheon.gnome-settings-daemon 182 - pantheon.elementary-session-settings 183 - ]; 184 - programs.dconf.enable = true; 185 - networking.networkmanager.enable = mkDefault true; 186 - 187 - systemd.user.targets."gnome-session-x11-services".wants = [ 188 - "org.gnome.SettingsDaemon.XSettings.service" 189 - ]; 190 - systemd.user.targets."gnome-session-x11-services-ready".wants = [ 191 - "org.gnome.SettingsDaemon.XSettings.service" 192 - ]; 193 - 194 - # Global environment 195 - environment.systemPackages = 196 - (with pkgs.pantheon; [ 197 - elementary-bluetooth-daemon 198 - elementary-session-settings 199 - elementary-settings-daemon 200 - gala 201 - gnome-settings-daemon 202 - (switchboard-with-plugs.override { 203 - plugs = cfg.extraSwitchboardPlugs; 204 - }) 205 - (wingpanel-with-indicators.override { 206 - indicators = cfg.extraWingpanelIndicators; 207 - }) 208 - ]) 209 - ++ utils.removePackagesByName ( 210 - (with pkgs; [ 211 - desktop-file-utils 212 - glib # for gsettings program 213 - gnome-menus 214 - adwaita-icon-theme 215 - gtk3.out # for gtk-launch program 216 - onboard 217 - sound-theme-freedesktop 218 - xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ 219 - ]) 220 - ++ (with pkgs.pantheon; [ 221 - # Artwork 222 - elementary-gtk-theme 223 - elementary-icon-theme 224 - elementary-sound-theme 225 - elementary-wallpapers 226 - 227 - # Desktop 228 - elementary-default-settings 229 - elementary-dock 230 - elementary-shortcut-overlay 231 - 232 - # Services 233 - elementary-capnet-assist 234 - elementary-notifications 235 - pantheon-agent-geoclue2 236 - pantheon-agent-polkit 237 - ]) 238 - ) config.environment.pantheon.excludePackages; 239 - 240 - # Settings from elementary-default-settings 241 - # GTK4 will try both $XDG_CONFIG_DIRS/gtk-4.0 and ${gtk4}/etc/gtk-4.0, but not /etc/gtk-4.0. 242 - environment.etc."xdg/gtk-4.0/settings.ini".source = 243 - "${pkgs.pantheon.elementary-default-settings}/etc/gtk-4.0/settings.ini"; 244 - 245 - xdg.mime.enable = true; 246 - xdg.icons.enable = true; 247 - 248 - xdg.portal.enable = true; 249 - xdg.portal.extraPortals = [ 250 - pkgs.xdg-desktop-portal-gtk 251 - ] 252 - ++ (with pkgs.pantheon; [ 253 - elementary-files 254 - elementary-settings-daemon 255 - xdg-desktop-portal-pantheon 256 - ]); 257 - 258 - xdg.portal.configPackages = mkDefault [ pkgs.pantheon.elementary-default-settings ]; 259 - 260 - # Override GSettings schemas 261 - environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; 262 - 263 - environment.sessionVariables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1"; 264 - 265 - environment.pathsToLink = [ 266 - # FIXME: modules should link subdirs of `/share` rather than relying on this 267 - "/share" 268 - ]; 269 - 270 - # Otherwise you can't store NetworkManager Secrets with 271 - # "Store the password only for this user" 272 - programs.nm-applet.enable = true; 273 - # Pantheon has its own network indicator 274 - programs.nm-applet.indicator = false; 275 - 276 - # Shell integration for VTE terminals 277 - programs.bash.vteIntegration = mkDefault true; 278 - programs.zsh.vteIntegration = mkDefault true; 279 - 280 - # Default Fonts 281 - fonts.packages = with pkgs; [ 282 - inter 283 - open-dyslexic 284 - open-sans 285 - roboto-mono 286 - ]; 287 - 288 - fonts.fontconfig.defaultFonts = { 289 - monospace = [ "Roboto Mono" ]; 290 - sansSerif = [ "Inter" ]; 291 - }; 292 - }) 293 - 294 - (mkIf serviceCfg.apps.enable { 295 - programs.evince.enable = mkDefault (notExcluded pkgs.evince); 296 - programs.file-roller.enable = mkDefault (notExcluded pkgs.file-roller); 297 - 298 - environment.systemPackages = utils.removePackagesByName ( 299 - [ 300 - pkgs.gnome-font-viewer 301 - ] 302 - ++ ( 303 - with pkgs.pantheon; 304 - [ 305 - elementary-calculator 306 - elementary-calendar 307 - elementary-camera 308 - elementary-code 309 - elementary-files 310 - elementary-mail 311 - elementary-music 312 - elementary-photos 313 - elementary-screenshot 314 - elementary-tasks 315 - elementary-terminal 316 - elementary-videos 317 - epiphany 318 - ] 319 - ++ lib.optionals config.services.flatpak.enable [ 320 - # Only install appcenter if flatpak is enabled before 321 - # https://github.com/NixOS/nixpkgs/issues/15932 is resolved. 322 - appcenter 323 - sideload 324 - ] 325 - ) 326 - ) config.environment.pantheon.excludePackages; 327 - 328 - # needed by screenshot 329 - fonts.packages = [ 330 - pkgs.pantheon.elementary-redacted-script 331 - ]; 332 - }) 333 - 334 - (mkIf serviceCfg.contractor.enable { 335 - environment.systemPackages = with pkgs.pantheon; [ 336 - contractor 337 - file-roller-contract 338 - ]; 339 - 340 - environment.pathsToLink = [ 341 - "/share/contractor" 342 - ]; 343 - }) 344 - 345 - ]; 346 - }
+1 -1
nixos/release.nix
··· 525 525 { ... }: 526 526 { 527 527 services.xserver.enable = true; 528 - services.xserver.desktopManager.pantheon.enable = true; 528 + services.desktopManager.pantheon.enable = true; 529 529 } 530 530 ); 531 531
-1
nixos/tests/all-tests.nix
··· 1143 1143 pam-zfs-key = runTest ./pam/zfs-key.nix; 1144 1144 pantalaimon = runTest ./matrix/pantalaimon.nix; 1145 1145 pantheon = runTest ./pantheon.nix; 1146 - pantheon-wayland = runTest ./pantheon-wayland.nix; 1147 1146 paperless = runTest ./paperless.nix; 1148 1147 paretosecurity = runTest ./paretosecurity.nix; 1149 1148 parsedmarc = handleTest ./parsedmarc { };
-104
nixos/tests/pantheon-wayland.nix
··· 1 - { pkgs, lib, ... }: 2 - 3 - { 4 - name = "pantheon-wayland"; 5 - 6 - meta.maintainers = lib.teams.pantheon.members; 7 - 8 - nodes.machine = 9 - { nodes, ... }: 10 - 11 - let 12 - videosAutostart = pkgs.writeTextFile { 13 - name = "autostart-elementary-videos"; 14 - destination = "/etc/xdg/autostart/io.elementary.videos.desktop"; 15 - text = '' 16 - [Desktop Entry] 17 - Version=1.0 18 - Name=Videos 19 - Type=Application 20 - Terminal=false 21 - Exec=io.elementary.videos %U 22 - ''; 23 - }; 24 - in 25 - { 26 - imports = [ ./common/user-account.nix ]; 27 - 28 - # Workaround ".gala-wrapped invoked oom-killer" 29 - virtualisation.memorySize = 2047; 30 - 31 - services.xserver.enable = true; 32 - services.xserver.desktopManager.pantheon.enable = true; 33 - services.displayManager = { 34 - autoLogin.enable = true; 35 - autoLogin.user = nodes.machine.users.users.alice.name; 36 - defaultSession = "pantheon-wayland"; 37 - }; 38 - 39 - # We ship pantheon.appcenter by default when this is enabled. 40 - services.flatpak.enable = true; 41 - 42 - # For basic OCR tests. 43 - environment.systemPackages = [ videosAutostart ]; 44 - 45 - # We don't ship gnome-text-editor in Pantheon module, we add this line mainly 46 - # to catch eval issues related to this option. 47 - environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ]; 48 - }; 49 - 50 - enableOCR = true; 51 - 52 - testScript = 53 - { nodes, ... }: 54 - let 55 - user = nodes.machine.users.users.alice; 56 - in 57 - '' 58 - machine.wait_for_unit("display-manager.service") 59 - 60 - with subtest("Wait for wayland server"): 61 - machine.wait_for_file("/run/user/${toString user.uid}/wayland-0") 62 - 63 - with subtest("Check that logging in has given the user ownership of devices"): 64 - machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") 65 - 66 - with subtest("Check if Pantheon components actually start"): 67 - # We specifically check gsd-xsettings here since it is manually pulled up by gala. 68 - # https://github.com/elementary/gala/pull/2140 69 - for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]: 70 - machine.wait_until_succeeds(f"pgrep -f {i}") 71 - machine.wait_until_succeeds("pgrep -xf ${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal") 72 - 73 - with subtest("Check if various environment variables are set"): 74 - cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ" 75 - machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'") 76 - machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'") 77 - # Hopefully from the sessionPath option. 78 - machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'") 79 - # Hopefully from login shell. 80 - machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'") 81 - # Hopefully from gcr-ssh-agent. 82 - machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'") 83 - 84 - with subtest("Wait for elementary videos autostart"): 85 - machine.wait_until_succeeds("pgrep -f io.elementary.videos") 86 - machine.wait_for_text("No Videos Open") 87 - machine.screenshot("videos") 88 - 89 - with subtest("Trigger multitasking view"): 90 - cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1" 91 - env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus" 92 - machine.succeed(f"su - ${user.name} -c '{env} {cmd}'") 93 - machine.sleep(5) 94 - machine.screenshot("multitasking") 95 - machine.succeed(f"su - ${user.name} -c '{env} {cmd}'") 96 - 97 - with subtest("Check if gala has ever coredumped"): 98 - machine.fail("coredumpctl --json=short | grep gala") 99 - # So we can see the dock. 100 - machine.execute("pkill -f -9 io.elementary.videos") 101 - machine.sleep(10) 102 - machine.screenshot("screen") 103 - ''; 104 - }
+34 -35
nixos/tests/pantheon.nix
··· 8 8 nodes.machine = 9 9 { ... }: 10 10 11 + let 12 + videosAutostart = pkgs.writeTextFile { 13 + name = "autostart-elementary-videos"; 14 + destination = "/etc/xdg/autostart/io.elementary.videos.desktop"; 15 + text = '' 16 + [Desktop Entry] 17 + Version=1.0 18 + Name=Videos 19 + Type=Application 20 + Terminal=false 21 + Exec=io.elementary.videos %U 22 + ''; 23 + }; 24 + in 11 25 { 12 26 imports = [ ./common/user-account.nix ]; 13 27 ··· 29 15 virtualisation.memorySize = 2047; 30 16 31 17 services.xserver.enable = true; 32 - services.xserver.desktopManager.pantheon.enable = true; 18 + services.desktopManager.pantheon.enable = true; 33 19 34 20 # We ship pantheon.appcenter by default when this is enabled. 35 21 services.flatpak.enable = true; 22 + 23 + # For basic OCR tests. 24 + environment.systemPackages = [ videosAutostart ]; 36 25 37 26 # We don't ship gnome-text-editor in Pantheon module, we add this line mainly 38 27 # to catch eval issues related to this option. 39 28 environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ]; 40 29 41 - environment.systemPackages = [ pkgs.xdotool ]; 30 + programs.ydotool.enable = true; 42 31 }; 43 32 44 33 enableOCR = true; ··· 50 33 { nodes, ... }: 51 34 let 52 35 user = nodes.machine.users.users.alice; 53 - bob = nodes.machine.users.users.bob; 54 36 in 55 37 '' 56 38 machine.wait_for_unit("display-manager.service") ··· 57 41 with subtest("Test we can see usernames in elementary-greeter"): 58 42 machine.wait_for_text("${user.description}") 59 43 machine.wait_until_succeeds("pgrep -f io.elementary.greeter-compositor") 60 - # OCR was struggling with this one. 61 - # machine.wait_for_text("${bob.description}") 62 44 # Ensure the password box is focused by clicking it. 63 45 # Workaround for https://github.com/NixOS/nixpkgs/issues/211366. 64 - machine.succeed("XAUTHORITY=/var/lib/lightdm/.Xauthority DISPLAY=:0 xdotool mousemove 512 505 click 1") 46 + machine.succeed("ydotool mousemove -a 220 275") 47 + machine.succeed("ydotool click 0xC0") 65 48 machine.sleep(2) 66 49 machine.screenshot("elementary_greeter_lightdm") 67 50 68 51 with subtest("Login with elementary-greeter"): 69 52 machine.send_chars("${user.password}\n") 70 - machine.wait_for_x() 71 - machine.wait_for_file("${user.home}/.Xauthority") 72 - machine.succeed("xauth merge ${user.home}/.Xauthority") 73 53 machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"') 54 + 55 + with subtest("Wait for wayland server"): 56 + machine.wait_for_file("/run/user/${toString user.uid}/wayland-0") 74 57 75 58 with subtest("Check that logging in has given the user ownership of devices"): 76 59 machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") 77 60 78 61 with subtest("Check if Pantheon components actually start"): 79 - for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]: 62 + # We specifically check gsd-xsettings here since it is manually pulled up by gala. 63 + # https://github.com/elementary/gala/pull/2140 64 + for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]: 80 65 machine.wait_until_succeeds(f"pgrep -f {i}") 81 - for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock"]: 82 - machine.wait_for_window(i) 83 66 machine.wait_until_succeeds("pgrep -xf ${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal") 84 67 85 68 with subtest("Check if various environment variables are set"): 86 69 cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ" 87 70 machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'") 71 + machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'") 88 72 # Hopefully from the sessionPath option. 89 73 machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'") 90 74 # Hopefully from login shell. ··· 92 76 # Hopefully from gcr-ssh-agent. 93 77 machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'") 94 78 95 - with subtest("Open elementary videos"): 96 - machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.videos >&2 &'") 97 - machine.sleep(2) 98 - machine.wait_for_window("io.elementary.videos") 79 + with subtest("Wait for elementary videos autostart"): 80 + machine.wait_until_succeeds("pgrep -f io.elementary.videos") 99 81 machine.wait_for_text("No Videos Open") 100 - 101 - with subtest("Open elementary calendar"): 102 - machine.wait_until_succeeds("pgrep -f evolution-calendar-factory") 103 - machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.calendar >&2 &'") 104 - machine.sleep(2) 105 - machine.wait_for_window("io.elementary.calendar") 106 - 107 - with subtest("Open system settings"): 108 - machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.settings >&2 &'") 109 - # Wait for all plugins to be loaded before we check if the window is still there. 110 - machine.sleep(5) 111 - machine.wait_for_window("io.elementary.settings") 112 - 113 - with subtest("Open elementary terminal"): 114 - machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'") 115 - machine.wait_for_window("io.elementary.terminal") 82 + machine.screenshot("videos") 116 83 117 84 with subtest("Trigger multitasking view"): 118 85 cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1" 119 - env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus DISPLAY=:0" 86 + env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus" 120 87 machine.succeed(f"su - ${user.name} -c '{env} {cmd}'") 121 88 machine.sleep(5) 122 89 machine.screenshot("multitasking") ··· 107 108 108 109 with subtest("Check if gala has ever coredumped"): 109 110 machine.fail("coredumpctl --json=short | grep gala") 110 - # So you can see the dock in the below screenshot. 111 - machine.succeed("su - ${user.name} -c 'DISPLAY=:0 xdotool mousemove 450 1000 >&2 &'") 111 + # So we can see the dock. 112 + machine.execute("pkill -f -9 io.elementary.videos") 112 113 machine.sleep(10) 113 114 machine.screenshot("screen") 114 115 '';
-44
pkgs/by-name/bf/bfc/package.nix
··· 1 - { 2 - lib, 3 - rustPlatform, 4 - fetchFromGitHub, 5 - llvmPackages_13, 6 - libxml2, 7 - ncurses, 8 - zlib, 9 - stdenv, 10 - }: 11 - 12 - rustPlatform.buildRustPackage rec { 13 - pname = "bfc"; 14 - version = "1.12.0"; 15 - 16 - src = fetchFromGitHub { 17 - owner = "Wilfred"; 18 - repo = "bfc"; 19 - rev = version; 20 - hash = "sha256-5pcvwCtXWEexvV3TS62dZ6Opg8ANP2L8B0Z8u/OQENU="; 21 - }; 22 - 23 - cargoHash = "sha256-S8Fy0PRSUftljcX34Sj8MmlPW7Oob2yayPUA1RRxf8E="; 24 - 25 - buildInputs = [ 26 - libxml2 27 - ncurses 28 - zlib 29 - ]; 30 - 31 - env.LLVM_SYS_130_PREFIX = llvmPackages_13.llvm.dev; 32 - 33 - # process didn't exit successfully: <...> SIGSEGV 34 - doCheck = false; 35 - 36 - meta = with lib; { 37 - description = "Industrial-grade brainfuck compiler"; 38 - mainProgram = "bfc"; 39 - homepage = "https://bfc.wilfred.me.uk"; 40 - license = licenses.gpl2Plus; 41 - maintainers = with maintainers; [ figsoda ]; 42 - broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux; 43 - }; 44 - }
+1 -1
pkgs/by-name/ca/calamares-nixos-extensions/src/modules/nixos/main.py
··· 140 140 141 141 # Enable the Pantheon Desktop Environment. 142 142 services.xserver.displayManager.lightdm.enable = true; 143 - services.xserver.desktopManager.pantheon.enable = true; 143 + services.desktopManager.pantheon.enable = true; 144 144 145 145 """ 146 146
-53
pkgs/by-name/da/dale/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - cmake, 6 - pkg-config, 7 - libffi, 8 - llvm_13, 9 - perl, 10 - }: 11 - 12 - stdenv.mkDerivation { 13 - pname = "dale"; 14 - version = "20220411"; 15 - 16 - src = fetchFromGitHub { 17 - owner = "tomhrr"; 18 - repo = "dale"; 19 - rev = "7386ef2d8912c60c6fb157a1e5cd772e15eaf658"; 20 - sha256 = "sha256-LNWqrFuEjtL7zuPTBfe4qQWr8IrT/ldQWSeDTK3Wqmo="; 21 - }; 22 - 23 - nativeBuildInputs = [ 24 - cmake 25 - pkg-config 26 - llvm_13.dev 27 - ]; 28 - buildInputs = [ 29 - libffi 30 - llvm_13 31 - ]; 32 - 33 - nativeCheckInputs = [ perl ]; 34 - 35 - checkTarget = "tests"; 36 - 37 - meta = with lib; { 38 - description = "Lisp-flavoured C"; 39 - longDescription = '' 40 - Dale is a system (no GC) programming language that uses 41 - S-expressions for syntax and supports syntactic macros. 42 - ''; 43 - homepage = "https://github.com/tomhrr/dale"; 44 - license = licenses.bsd3; 45 - maintainers = with maintainers; [ amiloradovsky ]; 46 - platforms = [ 47 - "i686-linux" 48 - "x86_64-linux" 49 - "aarch64-linux" 50 - ]; 51 - # failed on Darwin: linker couldn't find the FFI lib 52 - }; 53 - }
-64
pkgs/by-name/ho/hobbes/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - llvmPackages, 5 - fetchFromGitHub, 6 - cmake, 7 - llvm_12, 8 - ncurses, 9 - readline, 10 - zlib, 11 - libxml2, 12 - python3, 13 - }: 14 - llvmPackages.stdenv.mkDerivation { 15 - pname = "hobbes"; 16 - version = "0-unstable-2025-04-23"; 17 - 18 - src = fetchFromGitHub { 19 - owner = "morganstanley"; 20 - repo = "hobbes"; 21 - rev = "0829030be03d47f91075cbebd0c9565f44bf9911"; 22 - hash = "sha256-GZ26XL4++2MWQED2tVWeJ8HFcFQUXnXZ3+JCgdlAXNo="; 23 - }; 24 - 25 - CXXFLAGS = [ 26 - "-Wno-error=missing-template-arg-list-after-template-kw" 27 - "-Wno-error=deprecated-copy" 28 - ]; 29 - 30 - nativeBuildInputs = [ 31 - cmake 32 - ]; 33 - 34 - buildInputs = [ 35 - llvm_12 36 - ncurses 37 - readline 38 - zlib 39 - libxml2 40 - python3 41 - ]; 42 - 43 - doCheck = true; 44 - checkTarget = "test"; 45 - 46 - meta = with lib; { 47 - broken = stdenv.hostPlatform.isDarwin; 48 - description = "Language and an embedded JIT compiler"; 49 - longDescription = '' 50 - Hobbes is a a language, embedded compiler, and runtime for efficient 51 - dynamic expression evaluation, data storage and analysis. 52 - ''; 53 - homepage = "https://github.com/morganstanley/hobbes"; 54 - license = licenses.asl20; 55 - maintainers = with maintainers; [ 56 - kthielen 57 - thmzlt 58 - ]; 59 - platforms = [ 60 - "x86_64-linux" 61 - "x86_64-darwin" 62 - ]; 63 - }; 64 - }
+3 -2
pkgs/by-name/le/ledfx/package.nix
··· 6 6 7 7 python3.pkgs.buildPythonApplication rec { 8 8 pname = "ledfx"; 9 - version = "2.0.109"; 9 + version = "2.0.110"; 10 10 pyproject = true; 11 11 12 12 src = fetchPypi { 13 13 inherit pname version; 14 - hash = "sha256-fSb3NBl1bYCfwDkWI7/KeFIVcXTPDKBbLe0sQhneX6A="; 14 + hash = "sha256-utYpAIt9ThgV58h4p3d2q/pLfCU2zlXyCnTP2kqkDjg="; 15 15 }; 16 16 17 17 pythonRelaxDeps = true; ··· 36 36 icmplib 37 37 mss 38 38 multidict 39 + netifaces2 39 40 numpy 40 41 openrgb-python 41 42 paho-mqtt
+40
pkgs/by-name/lr/lrcsnc/package.nix
··· 1 + { 2 + lib, 3 + buildGoModule, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + }: 7 + 8 + buildGoModule (finalAttrs: { 9 + pname = "lrcsnc"; 10 + version = "0.1.0"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "Endg4meZer0"; 14 + repo = "lrcsnc"; 15 + tag = "v${finalAttrs.version}"; 16 + hash = "sha256-gKb0cTpCPlyvJFthV1csn8HaVcUvXq+KC+nTT5sGhww="; 17 + }; 18 + 19 + vendorHash = "sha256-ww+SXy29woGlb120sj1oGb4MIQJzpBCKGpUKYsYxTMk="; 20 + 21 + ldflags = [ "-X lrcsnc/internal/setup.version=${finalAttrs.version}" ]; 22 + 23 + # The tests require network access 24 + doCheck = false; 25 + 26 + postInstall = '' 27 + install -Dm644 LICENSE $out/share/licenses/lrcsnc/LICENSE 28 + ''; 29 + 30 + passthru.updateScript = nix-update-script { }; 31 + 32 + meta = { 33 + description = "Player-agnostic synced lyrics fetcher and displayer"; 34 + homepage = "https://github.com/Endg4meZer0/lrcsnc"; 35 + mainProgram = "lrcsnc"; 36 + license = lib.licenses.mit; 37 + platforms = lib.platforms.linux; 38 + maintainers = with lib.maintainers; [ lonerOrz ]; 39 + }; 40 + })
+7 -7
pkgs/by-name/ma/maphosts/package.nix
··· 13 13 gemdir = ./.; 14 14 }; 15 15 in 16 - stdenv.mkDerivation { 16 + stdenv.mkDerivation (finalAttrs: { 17 17 pname = "maphosts"; 18 18 version = env.gems.maphosts.version; 19 19 ··· 26 26 27 27 passthru.updateScript = bundlerUpdateScript "maphosts"; 28 28 29 - meta = with lib; { 29 + meta = { 30 30 description = "Small command line application for keeping your project hostnames in sync with /etc/hosts"; 31 31 homepage = "https://github.com/mpscholten/maphosts"; 32 - changelog = "https://github.com/mpscholten/maphosts/releases/tag/v${version}"; 33 - license = licenses.mit; 34 - maintainers = with maintainers; [ 32 + changelog = "https://github.com/mpscholten/maphosts/releases/tag/v${finalAttrs.version}"; 33 + license = lib.licenses.mit; 34 + maintainers = with lib.maintainers; [ 35 35 mpscholten 36 36 nicknovitski 37 37 ]; 38 - platforms = platforms.all; 38 + platforms = lib.platforms.all; 39 39 mainProgram = "maphosts"; 40 40 }; 41 - } 41 + })
+5 -5
pkgs/by-name/me/mercurial/package.nix
··· 117 117 mercurial-tests = makeTests { flags = "--with-hg=$MERCURIAL_BASE/bin/hg"; }; 118 118 }; 119 119 120 - meta = with lib; { 120 + meta = { 121 121 description = "Fast, lightweight SCM system for very large distributed projects"; 122 122 homepage = "https://www.mercurial-scm.org"; 123 123 downloadPage = "https://www.mercurial-scm.org/release/"; 124 - changelog = "https://wiki.mercurial-scm.org/Release${versions.majorMinor version}"; 125 - license = licenses.gpl2Plus; 126 - maintainers = with maintainers; [ 124 + changelog = "https://wiki.mercurial-scm.org/Release${lib.versions.majorMinor version}"; 125 + license = lib.licenses.gpl2Plus; 126 + maintainers = with lib.maintainers; [ 127 127 lukegb 128 128 euxane 129 129 techknowlogick 130 130 ]; 131 - platforms = platforms.unix; 131 + platforms = lib.platforms.unix; 132 132 mainProgram = "hg"; 133 133 }; 134 134 };
+2 -2
pkgs/by-name/mo/mopac/package.nix
··· 13 13 14 14 stdenv.mkDerivation rec { 15 15 pname = "mopac"; 16 - version = "23.1.2"; 16 + version = "23.2"; 17 17 18 18 src = fetchFromGitHub { 19 19 owner = "openmopac"; 20 20 repo = "mopac"; 21 21 rev = "v${version}"; 22 - hash = "sha256-guMPXz7nQWxnmY4f+CGIAf3MBiV00GxSEdsZQ2fAjh4="; 22 + hash = "sha256-P2BEXzclHJHSoaIIgCKVC3j63Af+J6rO0acwjv9ybbA="; 23 23 }; 24 24 25 25 nativeBuildInputs = [
-47
pkgs/by-name/mp/mpris-discord-rpc/package.nix
··· 1 - { 2 - lib, 3 - rustPlatform, 4 - fetchFromGitHub, 5 - pkg-config, 6 - dbus, 7 - openssl, 8 - stdenv, 9 - }: 10 - 11 - rustPlatform.buildRustPackage (finalAttrs: { 12 - pname = "mpris-discord-rpc"; 13 - version = "0.5.1"; 14 - 15 - src = fetchFromGitHub { 16 - owner = "patryk-ku"; 17 - repo = "mpris-discord-rpc"; 18 - tag = "v${finalAttrs.version}"; 19 - hash = "sha256-tPIm07q5HWosqhA3zefyuwM+fIztNZe1sSpB/NmUIoE="; 20 - }; 21 - 22 - cargoHash = "sha256-3MJAvCc0ekUQ+eM5n8MdPNxXJWUgV76vi/Rq7GhhEPE="; 23 - 24 - nativeBuildInputs = [ 25 - pkg-config 26 - ]; 27 - 28 - buildInputs = [ 29 - dbus 30 - openssl 31 - ]; 32 - 33 - postInstall = '' 34 - mkdir --parents $out/etc/systemd/user 35 - substitute $src/mpris-discord-rpc.service $out/etc/systemd/user/mpris-discord-rpc.service \ 36 - --replace-fail /usr/bin/mpris-discord-rpc $out/bin/mpris-discord-rpc 37 - ''; 38 - 39 - meta = { 40 - description = "Linux Discord rich presence for music, using MPRIS with album cover and progress bar support"; 41 - homepage = "https://github.com/patryk-ku/mpris-discord-rpc"; 42 - changelog = "https://github.com/patryk-ku/mpris-discord-rpc/blob/${finalAttrs.src.tag}/CHANGELOG.md"; 43 - license = lib.licenses.mit; 44 - maintainers = [ lib.maintainers.lukaswrz ]; 45 - mainProgram = "mpris-discord-rpc"; 46 - }; 47 - })
+47
pkgs/by-name/mu/music-discord-rpc/package.nix
··· 1 + { 2 + lib, 3 + rustPlatform, 4 + fetchFromGitHub, 5 + pkg-config, 6 + dbus, 7 + openssl, 8 + stdenv, 9 + }: 10 + 11 + rustPlatform.buildRustPackage (finalAttrs: { 12 + pname = "music-discord-rpc"; 13 + version = "0.6.1"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "patryk-ku"; 17 + repo = "music-discord-rpc"; 18 + tag = "v${finalAttrs.version}"; 19 + hash = "sha256-+MSrGrnjkyLTCqQiSC2OIGAMgA2oLFqvUtud0kwTTGA="; 20 + }; 21 + 22 + cargoHash = "sha256-Waw/7ErijLSq1RYtjlmtjP8vHYl3wXmRAXvGvH3wOZA="; 23 + 24 + nativeBuildInputs = [ 25 + pkg-config 26 + ]; 27 + 28 + buildInputs = [ 29 + dbus 30 + openssl 31 + ]; 32 + 33 + postInstall = '' 34 + mkdir --parents $out/etc/systemd/user 35 + substitute music-discord-rpc.service $out/etc/systemd/user/music-discord-rpc.service \ 36 + --replace-fail /usr/bin/music-discord-rpc $out/bin/music-discord-rpc 37 + ''; 38 + 39 + meta = { 40 + description = "Cross-platform Discord rich presence for music with album cover and progress bar support"; 41 + homepage = "https://github.com/patryk-ku/music-discord-rpc"; 42 + changelog = "https://github.com/patryk-ku/music-discord-rpc/blob/${finalAttrs.src.tag}/CHANGELOG.md"; 43 + license = lib.licenses.mit; 44 + maintainers = [ lib.maintainers.lukaswrz ]; 45 + mainProgram = "music-discord-rpc"; 46 + }; 47 + })
-42
pkgs/by-name/oc/oclgrind/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - cmake, 6 - llvmPackages_13, 7 - readline, 8 - python3, 9 - }: 10 - 11 - stdenv.mkDerivation rec { 12 - pname = "oclgrind"; 13 - version = "21.10"; 14 - 15 - src = fetchFromGitHub { 16 - owner = "jrprice"; 17 - repo = "oclgrind"; 18 - rev = "v${version}"; 19 - sha256 = "sha256-DGCF7X2rPV1w9guxg2bMylRirXQgez24sG7Unlct3ow="; 20 - }; 21 - 22 - nativeBuildInputs = [ cmake ]; 23 - nativeCheckInputs = [ python3 ]; 24 - buildInputs = [ 25 - llvmPackages_13.llvm 26 - llvmPackages_13.clang-unwrapped 27 - readline 28 - ]; 29 - 30 - cmakeFlags = [ 31 - "-DCLANG_ROOT=${llvmPackages_13.clang-unwrapped}" 32 - (lib.cmakeBool "CMAKE_SKIP_RPATH" true) 33 - ]; 34 - 35 - meta = with lib; { 36 - description = "OpenCL device simulator and debugger"; 37 - homepage = "https://github.com/jrprice/oclgrind"; 38 - license = licenses.bsd3; 39 - platforms = platforms.linux; 40 - maintainers = with maintainers; [ athas ]; 41 - }; 42 - }
+5 -5
pkgs/by-name/pg/pgf2/package.nix
··· 27 27 runHook postInstall 28 28 ''; 29 29 30 - meta = with lib; { 30 + meta = { 31 31 homepage = "https://github.com/pgf-tikz/pgf"; 32 32 description = "Portable Graphic Format for TeX"; 33 - branch = lib.versions.major version; 34 - license = licenses.gpl2Plus; 35 - maintainers = with maintainers; [ ]; 36 - platforms = platforms.unix; 33 + branch = lib.versions.major finalAttrs.version; 34 + license = lib.licenses.gpl2Plus; 35 + maintainers = [ ]; 36 + platforms = lib.platforms.unix; 37 37 }; 38 38 })
+5 -5
pkgs/by-name/pg/pgf3/package.nix
··· 27 27 runHook postInstall 28 28 ''; 29 29 30 - meta = with lib; { 30 + meta = { 31 31 homepage = "https://github.com/pgf-tikz/pgf"; 32 32 description = "Portable Graphic Format for TeX - version ${finalAttrs.version}"; 33 - branch = lib.versions.major version; 34 - license = licenses.gpl2Plus; 35 - maintainers = with maintainers; [ ]; 36 - platforms = platforms.unix; 33 + branch = lib.versions.major finalAttrs.version; 34 + license = lib.licenses.gpl2Plus; 35 + maintainers = [ ]; 36 + platforms = lib.platforms.unix; 37 37 }; 38 38 })
+2 -2
pkgs/by-name/ps/pshash/package.nix
··· 5 5 }: 6 6 haskellPackages.mkDerivation rec { 7 7 pname = "pshash"; 8 - version = "0.1.15.1"; 8 + version = "0.1.16.0"; 9 9 src = fetchFromGitHub { 10 10 owner = "thornoar"; 11 11 repo = "pshash"; 12 12 tag = "v${version}"; 13 - hash = "sha256-TnMXT0sgUkHCbZ2YgDmSgOg8A2DKk/LyKK2XXwabrYc="; 13 + hash = "sha256-3Qe52Hto3Z96b5q9TLz7XB7BzMfdNBd4p8V6dknH6VM="; 14 14 }; 15 15 16 16 postPatch = ''
-45
pkgs/by-name/qr/qrscan/package.nix
··· 1 - { 2 - clang_15, 3 - lib, 4 - rustPlatform, 5 - fetchFromGitHub, 6 - stdenv, 7 - }: 8 - 9 - rustPlatform.buildRustPackage rec { 10 - pname = "qrscan"; 11 - version = "0.1.9"; 12 - 13 - src = fetchFromGitHub { 14 - owner = "sayanarijit"; 15 - repo = "qrscan"; 16 - rev = "v${version}"; 17 - hash = "sha256-nAUZUE7NppsCAV8UyR8+OkikT4nJtnamsSVeyNz21EQ="; 18 - }; 19 - 20 - nativeBuildInputs = [ 21 - (rustPlatform.bindgenHook.overrideAttrs { 22 - libclang = clang_15.cc.lib; 23 - }) 24 - ]; 25 - 26 - cargoHash = "sha256-hBDB/Cp8JTk9hF3qDBCb7LicUZdpXHm2i2dsuw5geO4="; 27 - 28 - checkFlags = [ 29 - # requires filesystem write access 30 - "--skip=tests::test_export_files" 31 - "--skip=tests::test_scan_from_stdin" 32 - "--skip=tests::test_scan_jpeg_file" 33 - "--skip=tests::test_scan_no_content" 34 - "--skip=tests::test_scan_png_file" 35 - ]; 36 - 37 - meta = with lib; { 38 - description = "Scan a QR code in the terminal using the system camera or a given image"; 39 - mainProgram = "qrscan"; 40 - homepage = "https://github.com/sayanarijit/qrscan"; 41 - license = licenses.mit; 42 - broken = stdenv.hostPlatform.isDarwin; 43 - maintainers = [ maintainers.sayanarijit ]; 44 - }; 45 - }
+68
pkgs/by-name/ra/radio-active/package.nix
··· 1 + { 2 + lib, 3 + python3Packages, 4 + fetchFromGitHub, 5 + ffmpeg, 6 + }: 7 + 8 + let 9 + ## https://github.com/deep5050/radio-active/blob/main/requirements.txt 10 + pyradios_1-0-2 = python3Packages.pyradios.overrideAttrs ( 11 + finalAttrs: previousAttrs: 12 + let 13 + version = "1.0.2"; 14 + in 15 + { 16 + inherit version; 17 + 18 + src = previousAttrs.src.override { 19 + inherit version; 20 + hash = "sha256-O30ExmvWu4spwDytFVPWGjR8w3XSTaWd2Z0LGQibq9g="; 21 + }; 22 + } 23 + ); 24 + 25 + pname = "radio-active"; 26 + version = "2.9.1"; 27 + in 28 + python3Packages.buildPythonApplication { 29 + inherit pname version; 30 + pyproject = true; 31 + 32 + src = fetchFromGitHub { 33 + owner = "S0AndS0"; 34 + repo = "radio-active"; 35 + rev = "2befa6a309d9c411ef1ea522e706ed3e098e5341"; 36 + hash = "sha256-wqETmdqvxsKnjkjQADq59J83QkOhLA74SPtuWTpsvO0="; 37 + }; 38 + 39 + postPatch = '' 40 + substituteInPlace radioactive/recorder.py \ 41 + --replace-fail '"ffmpeg",' '"${lib.getExe ffmpeg}",' 42 + 43 + substituteInPlace radioactive/ffplay.py \ 44 + --replace-fail 'self.exe_path = which(self.program_name)' \ 45 + 'self.exe_path = "${ffmpeg.outPath}/bin/ffplay"' 46 + ''; 47 + 48 + build-system = with python3Packages; [ setuptools ]; 49 + 50 + dependencies = with python3Packages; [ 51 + requests 52 + urllib3 53 + psutil 54 + pyradios_1-0-2 55 + zenlog 56 + requests-cache 57 + rich 58 + pick 59 + ]; 60 + 61 + meta = { 62 + description = "Play any radios from around the globe right from the terminal"; 63 + homepage = "https://www.radio-browser.info/"; 64 + changelog = "https://github.com/deep5050/radio-active/releases/tag/v${version}"; 65 + license = lib.licenses.mit; 66 + maintainers = with lib.maintainers; [ S0AndS0 ]; 67 + }; 68 + }
+6 -5
pkgs/by-name/sh/shader-slang/package.nix
··· 11 11 libX11, 12 12 glslang, 13 13 unordered_dense, 14 - llvmPackages_14, 14 + llvmPackages, 15 15 versionCheckHook, 16 16 gitUpdater, 17 17 ··· 73 73 libX11 74 74 ] 75 75 ++ lib.optionals withLLVM [ 76 - # Slang only supports LLVM 14: 77 - # https://github.com/shader-slang/slang/blob/v2025.15/docs/building.md#llvm-support 78 - llvmPackages_14.llvm 79 - llvmPackages_14.libclang 76 + llvmPackages.llvm 77 + llvmPackages.libclang 80 78 ] 81 79 ++ lib.optionals withGlslang [ 82 80 # SPIRV-tools is included in glslang. ··· 148 150 maintainers = with lib.maintainers; [ niklaskorz ]; 149 151 mainProgram = "slangc"; 150 152 platforms = lib.platforms.all; 153 + # Slang only supports LLVM 14: 154 + # https://github.com/shader-slang/slang/blob/v2025.15/docs/building.md#llvm-support 155 + broken = withLLVM; 151 156 }; 152 157 })
+27 -10
pkgs/by-name/sn/sniffnet/package.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 rustPlatform, 4 5 fetchFromGitHub, 6 + 7 + # nativeBuildInputs 5 8 pkg-config, 9 + 10 + # buildInputs 6 11 libpcap, 7 - libxkbcommon, 8 12 openssl, 9 - stdenv, 10 13 alsa-lib, 11 14 expat, 12 15 fontconfig, 13 16 vulkan-loader, 14 - wayland, 15 17 xorg, 18 + 19 + # wrapper 20 + libxkbcommon, 21 + wayland, 22 + 23 + # tests 24 + versionCheckHook, 16 25 }: 17 26 18 - rustPlatform.buildRustPackage rec { 27 + rustPlatform.buildRustPackage (finalAttrs: { 19 28 pname = "sniffnet"; 20 - version = "1.3.2"; 29 + version = "1.4.1"; 21 30 22 31 src = fetchFromGitHub { 23 32 owner = "gyulyvgc"; 24 33 repo = "sniffnet"; 25 - tag = "v${version}"; 26 - hash = "sha256-MWYCXLIv0euEHkfqZCxbfs1wFHkGIFk06wn7F8CIXx0="; 34 + tag = "v${finalAttrs.version}"; 35 + hash = "sha256-EgnFDF+K8qGjunWB20VA8bXLzNvyGzcIaim+smhW5fU="; 27 36 }; 28 37 29 - cargoHash = "sha256-M7vIiGdH5+rdlqi603bfcXZavUAx2tU7+4sXb+QG+2g="; 38 + cargoHash = "sha256-22P1EeZ2FqwIHjr23oJCKvg3ggT1Me93goELwZ/B9S4="; 30 39 31 40 nativeBuildInputs = [ pkg-config ]; 32 41 ··· 60 51 # requires internet access 61 52 checkFlags = [ 62 53 "--skip=secondary_threads::check_updates::tests::fetch_latest_release_from_github" 54 + "--skip=utils::check_updates::tests::fetch_latest_release_from_github" 63 55 ]; 64 56 65 57 postInstall = '' ··· 85 75 } 86 76 ''; 87 77 78 + nativeInstallCheckInputs = [ 79 + versionCheckHook 80 + ]; 81 + versionCheckProgramArg = "--version"; 82 + doInstallCheck = true; 83 + 88 84 meta = { 89 85 description = "Cross-platform application to monitor your network traffic with ease"; 90 86 homepage = "https://github.com/gyulyvgc/sniffnet"; 91 - changelog = "https://github.com/gyulyvgc/sniffnet/blob/v${version}/CHANGELOG.md"; 87 + changelog = "https://github.com/gyulyvgc/sniffnet/blob/v${finalAttrs.version}/CHANGELOG.md"; 92 88 license = with lib.licenses; [ 93 89 mit # or 94 90 asl20 95 91 ]; 96 92 maintainers = with lib.maintainers; [ figsoda ]; 93 + teams = [ lib.teams.ngi ]; 97 94 mainProgram = "sniffnet"; 98 95 }; 99 - } 96 + })
+2 -28
pkgs/by-name/sp/spirv-llvm-translator/package.nix
··· 36 36 rev = "v${version}"; 37 37 hash = "sha256-rt3RTZut41uDEh0YmpOzH3sOezeEVWtAIGMKCHLSJBw="; 38 38 }; 39 - "17" = rec { 40 - version = "17.0.15"; 41 - rev = "v${version}"; 42 - hash = "sha256-ETpTQYMMApECDfuRY87HrO/PUxZ13x9dBRJ3ychslUI="; 43 - }; 44 - "16" = rec { 45 - version = "16.0.15"; 46 - rev = "v${version}"; 47 - hash = "sha256-30i73tGl+1KlP92XA0uxdMTydd9EtaQ4SZ0W1kdm1fQ="; 48 - }; 49 - "15" = rec { 50 - version = "15.0.15"; 51 - rev = "v${version}"; 52 - hash = "sha256-kFVDS+qwoG1AXrZ8LytoiLVbZkTGR9sO+Wrq3VGgWNQ="; 53 - }; 54 - "14" = rec { 55 - version = "14.0.14"; 56 - rev = "v${version}"; 57 - hash = "sha256-PW+5w93omLYPZXjRtU4BNY2ztZ86pcjgUQZkrktMq+4="; 58 - }; 59 39 }; 60 40 61 41 branch = versions."${llvmMajor}" or (throw "Incompatible LLVM version ${llvmMajor}"); ··· 50 70 inherit (branch) rev hash; 51 71 }; 52 72 53 - patches = lib.optionals (llvmMajor == "14") [ 54 - (fetchpatch { 55 - # tries to install llvm-spirv into llvm nix store path 56 - url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch"; 57 - revert = true; 58 - hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8="; 59 - }) 60 - ]; 73 + # TODO: Remove. 74 + patches = [ ]; 61 75 62 76 nativeBuildInputs = [ 63 77 pkg-config
-32
pkgs/by-name/wa/wavm/package.nix
··· 1 - { 2 - lib, 3 - llvmPackages_12, 4 - fetchFromGitHub, 5 - cmake, 6 - }: 7 - 8 - llvmPackages_12.stdenv.mkDerivation (finalAttrs: { 9 - pname = "wavm"; 10 - version = "2022-05-14"; 11 - 12 - src = fetchFromGitHub { 13 - owner = "WAVM"; 14 - repo = "WAVM"; 15 - rev = "nightly/${finalAttrs.version}"; 16 - hash = "sha256-SHz+oOOkwvVZucJYFSyZc3MnOAy1VatspmZmOAXYAWA="; 17 - }; 18 - 19 - nativeBuildInputs = [ 20 - cmake 21 - llvmPackages_12.llvm 22 - ]; 23 - 24 - meta = with lib; { 25 - description = "WebAssembly Virtual Machine"; 26 - mainProgram = "wavm"; 27 - homepage = "https://wavm.github.io"; 28 - license = licenses.bsd3; 29 - maintainers = with maintainers; [ ereslibre ]; 30 - platforms = platforms.unix; 31 - }; 32 - })
+3 -3
pkgs/by-name/we/werf/package.nix
··· 10 10 }: 11 11 buildGoModule (finalAttrs: { 12 12 pname = "werf"; 13 - version = "2.47.4"; 13 + version = "2.47.5"; 14 14 15 15 src = fetchFromGitHub { 16 16 owner = "werf"; 17 17 repo = "werf"; 18 18 tag = "v${finalAttrs.version}"; 19 - hash = "sha256-V/RwHwPp1THlzFdMts5qt4Ueqcoxx932eMqgF6yiZpM="; 19 + hash = "sha256-rr0jHeAz8gcKj1rUzL8BoDFvuVrZF1+3I7ruKIvt8Rw="; 20 20 }; 21 21 22 22 proxyVendor = true; 23 - vendorHash = "sha256-kFaXOvJBp/QU0N2Jwq450G48O2GYgC2Pc+2bGK9rJ9g="; 23 + vendorHash = "sha256-dULy4iLpp+wlvk8gdzLQTJ6reRI1YQ8//+EU7/U/Xkw="; 24 24 25 25 subPackages = [ "cmd/werf" ]; 26 26
+5 -5
pkgs/by-name/we/wezterm/package.nix
··· 28 28 29 29 rustPlatform.buildRustPackage rec { 30 30 pname = "wezterm"; 31 - version = "0-unstable-2025-07-30"; 31 + version = "0-unstable-2025-08-14"; 32 32 33 33 src = fetchFromGitHub { 34 - owner = "wez"; 34 + owner = "wezterm"; 35 35 repo = "wezterm"; 36 - rev = "6a493f88fab06a792308e0c704790390fd3c6232"; 36 + rev = "bf9a2aeebacec19fd07b55234d626f006b22d369"; 37 37 fetchSubmodules = true; 38 - hash = "sha256-ilDUBkXKo3N83ew3I+Ic48SBjraCs3OyjVXlTItX0mU="; 38 + hash = "sha256-cD0r+TchRc/A+G3HMu2PjjPm8m7Ue7GpH9F/PlfJcKE="; 39 39 }; 40 40 41 41 postPatch = '' ··· 156 156 157 157 meta = with lib; { 158 158 description = "GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"; 159 - homepage = "https://wezfurlong.org/wezterm"; 159 + homepage = "https://wezterm.org"; 160 160 license = licenses.mit; 161 161 mainProgram = "wezterm"; 162 162 maintainers = with maintainers; [
+7 -3
pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix
··· 20 20 gnome-settings-daemon, 21 21 mutter, 22 22 elementary-icon-theme, 23 + elementary-settings-daemon, 23 24 wingpanel-with-indicators, 24 25 elementary-gtk-theme, 25 26 nixos-artwork, ··· 34 33 35 34 stdenv.mkDerivation rec { 36 35 pname = "elementary-greeter"; 37 - version = "8.0.1"; 36 + # To allow overriding last-session-type. 37 + # nixpkgs-update: no auto update 38 + version = "8.0.1-unstable-2025-09-14"; 38 39 39 40 src = fetchFromGitHub { 40 41 owner = "elementary"; 41 42 repo = "greeter"; 42 - rev = version; 43 - sha256 = "sha256-T/tI8WRVbTLdolDYa98M2Vm26p0xhGiai74lXAlpQ8k="; 43 + rev = "2461ad1be4a4d0e541879abe869cf8911f505215"; 44 + hash = "sha256-rDlaL2KCm0tz73cwHLgNAD7Ddbn1QFJVa+Syh5eTfWo="; 44 45 }; 45 46 46 47 patches = [ ··· 68 65 buildInputs = [ 69 66 accountsservice 70 67 elementary-icon-theme 68 + elementary-settings-daemon 71 69 gala # for io.elementary.desktop.background 72 70 gnome-desktop 73 71 gnome-settings-daemon
+5 -5
pkgs/desktops/xfce/applications/xfmpc/default.nix
··· 55 55 56 56 passthru.updateScript = gitUpdater { rev-prefix = "xfmpc-"; }; 57 57 58 - meta = with lib; { 58 + meta = { 59 59 description = "MPD client written in GTK"; 60 60 homepage = "https://docs.xfce.org/apps/xfmpc/start"; 61 - changelog = "https://gitlab.xfce.org/apps/xfmpc/-/blob/xfmpc-${version}/NEWS"; 62 - license = licenses.gpl2Plus; 63 - maintainers = with maintainers; [ doronbehar ]; 64 - teams = [ teams.xfce ]; 61 + changelog = "https://gitlab.xfce.org/apps/xfmpc/-/blob/xfmpc-${finalAttrs.version}/NEWS"; 62 + license = lib.licenses.gpl2Plus; 63 + maintainers = with lib.maintainers; [ doronbehar ]; 64 + teams = [ lib.teams.xfce ]; 65 65 mainProgram = "xfmpc"; 66 66 }; 67 67 })
-44
pkgs/development/compilers/cone/default.nix
··· 1 - { 2 - llvmPackages, 3 - lib, 4 - fetchFromGitHub, 5 - cmake, 6 - }: 7 - 8 - llvmPackages.stdenv.mkDerivation rec { 9 - pname = "cone"; 10 - version = "unstable-2022-12-12"; 11 - 12 - src = fetchFromGitHub { 13 - owner = "jondgoodwin"; 14 - repo = pname; 15 - rev = "698bd6afc75777eabbc8ef576d64d683c6a1c5ab"; 16 - sha256 = "0y2s9xgkci8n72v6gnc1i7shr2y3g2sa8fbr25gpxa9ipiq9khg7"; 17 - }; 18 - 19 - nativeBuildInputs = [ cmake ]; 20 - 21 - buildInputs = [ 22 - llvmPackages.llvm 23 - ]; 24 - 25 - # M68k is an experimental target, so not enabled by default 26 - postPatch = '' 27 - sed -i CMakeLists.txt \ 28 - -e '/M68k/d' 29 - ''; 30 - 31 - installPhase = '' 32 - install -Dm755 conec $out/bin/conec 33 - install -Dm644 libconestd.a $out/lib/libconestd.a 34 - ''; 35 - 36 - meta = with lib; { 37 - description = "Cone Programming Language"; 38 - mainProgram = "conec"; 39 - homepage = "https://cone.jondgoodwin.com"; 40 - license = licenses.mit; 41 - maintainers = with maintainers; [ ]; 42 - platforms = platforms.all; 43 - }; 44 - }
+4
pkgs/development/compilers/fpc/default.nix
··· 111 111 lgpl2 112 112 ]; 113 113 platforms = platforms.unix; 114 + # See: 115 + # * <https://gitlab.com/freepascal.org/fpc/source/-/issues/41045> 116 + # * <https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/887> 117 + broken = stdenv.cc.isClang && stdenv.hostPlatform.isx86_64; 114 118 }; 115 119 }
+2
pkgs/development/compilers/ghc/common-hadrian.nix
··· 892 892 timeout = 24 * 3600; 893 893 platforms = lib.platforms.all; 894 894 inherit (bootPkgs.ghc.meta) license; 895 + # To be fixed by <https://github.com/NixOS/nixpkgs/pull/440774>. 896 + broken = useLLVM; 895 897 }; 896 898 897 899 dontStrip = targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm;
+2
pkgs/development/compilers/ghc/common-make-native-bignum.nix
··· 672 672 timeout = 24 * 3600; 673 673 platforms = lib.platforms.all; 674 674 inherit (bootPkgs.ghc.meta) license; 675 + # To be fixed by <https://github.com/NixOS/nixpkgs/pull/440774>. 676 + broken = useLLVM; 675 677 }; 676 678 677 679 }
-235
pkgs/development/compilers/llvm/12/clang/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 9e74014134a0..976e6a1757fd 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4) 6 - if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) 7 - project(Clang) 8 - 9 - + include(GNUInstallDirs) 10 - + 11 - set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") 12 - set(CMAKE_CXX_STANDARD_REQUIRED YES) 13 - set(CMAKE_CXX_EXTENSIONS NO) 14 - @@ -416,7 +418,7 @@ include_directories(BEFORE 15 - 16 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 17 - install(DIRECTORY include/clang include/clang-c 18 - - DESTINATION include 19 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 20 - COMPONENT clang-headers 21 - FILES_MATCHING 22 - PATTERN "*.def" 23 - @@ -425,7 +427,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 24 - ) 25 - 26 - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang 27 - - DESTINATION include 28 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 29 - COMPONENT clang-headers 30 - FILES_MATCHING 31 - PATTERN "CMakeFiles" EXCLUDE 32 - @@ -445,7 +447,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 33 - 34 - add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh) 35 - install(PROGRAMS utils/bash-autocomplete.sh 36 - - DESTINATION share/clang 37 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 38 - COMPONENT bash-autocomplete) 39 - if(NOT LLVM_ENABLE_IDE) 40 - add_llvm_install_targets(install-bash-autocomplete 41 - diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 42 - index 704278a0e93b..d25c8d325c71 100644 43 - --- a/cmake/modules/AddClang.cmake 44 - +++ b/cmake/modules/AddClang.cmake 45 - @@ -123,9 +123,9 @@ macro(add_clang_library name) 46 - install(TARGETS ${lib} 47 - COMPONENT ${lib} 48 - ${export_to_clangtargets} 49 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 50 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 51 - - RUNTIME DESTINATION bin) 52 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 53 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 54 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 55 - 56 - if (NOT LLVM_ENABLE_IDE) 57 - add_llvm_install_targets(install-${lib} 58 - @@ -170,7 +170,7 @@ macro(add_clang_tool name) 59 - 60 - install(TARGETS ${name} 61 - ${export_to_clangtargets} 62 - - RUNTIME DESTINATION bin 63 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 64 - COMPONENT ${name}) 65 - 66 - if(NOT LLVM_ENABLE_IDE) 67 - @@ -185,7 +185,7 @@ endmacro() 68 - macro(add_clang_symlink name dest) 69 - add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) 70 - # Always generate install targets 71 - - llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) 72 - + llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE) 73 - endmacro() 74 - 75 - function(clang_target_link_libraries target type) 76 - diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt 77 - index b2c0ce8dd4a0..19e5443d8c25 100644 78 - --- a/lib/Headers/CMakeLists.txt 79 - +++ b/lib/Headers/CMakeLists.txt 80 - @@ -215,7 +215,7 @@ set_target_properties(clang-resource-headers PROPERTIES 81 - FOLDER "Misc" 82 - RUNTIME_OUTPUT_DIRECTORY "${output_dir}") 83 - 84 - -set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 85 - +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 86 - 87 - install( 88 - FILES ${files} ${generated_files} 89 - diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt 90 - index ceef4b08637c..8efad5520ca4 100644 91 - --- a/tools/c-index-test/CMakeLists.txt 92 - +++ b/tools/c-index-test/CMakeLists.txt 93 - @@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 94 - set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH 95 - "@executable_path/../../lib") 96 - else() 97 - - set(INSTALL_DESTINATION bin) 98 - + set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR}) 99 - endif() 100 - 101 - install(TARGETS c-index-test 102 - diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt 103 - index 35ecdb11253c..d77d75de0094 100644 104 - --- a/tools/clang-format/CMakeLists.txt 105 - +++ b/tools/clang-format/CMakeLists.txt 106 - @@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE ) 107 - endif() 108 - 109 - install(PROGRAMS clang-format-bbedit.applescript 110 - - DESTINATION share/clang 111 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 112 - COMPONENT clang-format) 113 - install(PROGRAMS clang-format-diff.py 114 - - DESTINATION share/clang 115 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 116 - COMPONENT clang-format) 117 - install(PROGRAMS clang-format-sublime.py 118 - - DESTINATION share/clang 119 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 120 - COMPONENT clang-format) 121 - install(PROGRAMS clang-format.el 122 - - DESTINATION share/clang 123 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 124 - COMPONENT clang-format) 125 - install(PROGRAMS clang-format.py 126 - - DESTINATION share/clang 127 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 128 - COMPONENT clang-format) 129 - install(PROGRAMS git-clang-format 130 - - DESTINATION bin 131 - + DESTINATION ${CMAKE_INSTALL_BINDIR} 132 - COMPONENT clang-format) 133 - diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt 134 - index cda8e29ec5b1..0134d8ccd70b 100644 135 - --- a/tools/clang-rename/CMakeLists.txt 136 - +++ b/tools/clang-rename/CMakeLists.txt 137 - @@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename 138 - ) 139 - 140 - install(PROGRAMS clang-rename.py 141 - - DESTINATION share/clang 142 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 143 - COMPONENT clang-rename) 144 - install(PROGRAMS clang-rename.el 145 - - DESTINATION share/clang 146 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/clang 147 - COMPONENT clang-rename) 148 - diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt 149 - index 51ff2e7e1565..1ed5f8a079a1 100644 150 - --- a/tools/libclang/CMakeLists.txt 151 - +++ b/tools/libclang/CMakeLists.txt 152 - @@ -166,7 +166,7 @@ endif() 153 - if(INTERNAL_INSTALL_PREFIX) 154 - set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include") 155 - else() 156 - - set(LIBCLANG_HEADERS_INSTALL_DESTINATION include) 157 - + set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 158 - endif() 159 - 160 - install(DIRECTORY ../../include/clang-c 161 - @@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) 162 - COMPONENT 163 - libclang-python-bindings 164 - DESTINATION 165 - - "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 166 - + "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 167 - endforeach() 168 - if(NOT LLVM_ENABLE_IDE) 169 - add_custom_target(libclang-python-bindings) 170 - diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt 171 - index ec0702d76f18..d25d982f51da 100644 172 - --- a/tools/scan-build/CMakeLists.txt 173 - +++ b/tools/scan-build/CMakeLists.txt 174 - @@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) 175 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) 176 - list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) 177 - install(PROGRAMS bin/${BinFile} 178 - - DESTINATION bin 179 - + DESTINATION ${CMAKE_INSTALL_BINDIR} 180 - COMPONENT scan-build) 181 - endforeach() 182 - 183 - @@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD) 184 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile}) 185 - list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile}) 186 - install(PROGRAMS libexec/${LibexecFile} 187 - - DESTINATION libexec 188 - + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR} 189 - COMPONENT scan-build) 190 - endforeach() 191 - 192 - @@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD) 193 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile}) 194 - list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile}) 195 - install(FILES share/scan-build/${ShareFile} 196 - - DESTINATION share/scan-build 197 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build 198 - COMPONENT scan-build) 199 - endforeach() 200 - 201 - diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt 202 - index dd3d33439299..fea19c12ce70 100644 203 - --- a/tools/scan-view/CMakeLists.txt 204 - +++ b/tools/scan-view/CMakeLists.txt 205 - @@ -19,7 +19,7 @@ if(CLANG_INSTALL_SCANVIEW) 206 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) 207 - list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) 208 - install(PROGRAMS bin/${BinFile} 209 - - DESTINATION bin 210 - + DESTINATION ${CMAKE_INSTALL_BINDIR} 211 - COMPONENT scan-view) 212 - endforeach() 213 - 214 - @@ -33,7 +33,7 @@ if(CLANG_INSTALL_SCANVIEW) 215 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}) 216 - list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}) 217 - install(FILES share/${ShareFile} 218 - - DESTINATION share/scan-view 219 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view 220 - COMPONENT scan-view) 221 - endforeach() 222 - 223 - diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt 224 - index 62f2de0cb15c..6aa66825b6ec 100644 225 - --- a/utils/hmaptool/CMakeLists.txt 226 - +++ b/utils/hmaptool/CMakeLists.txt 227 - @@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM 228 - 229 - list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) 230 - install(PROGRAMS ${CLANG_HMAPTOOL} 231 - - DESTINATION bin 232 - + DESTINATION ${CMAKE_INSTALL_BINDIR} 233 - COMPONENT hmaptool) 234 - 235 - add_custom_target(hmaptool ALL DEPENDS ${Depends})
-28
pkgs/development/compilers/llvm/12/clang/purity.patch
··· 1 - From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001 2 - From: Will Dietz <w@wdtz.org> 3 - Date: Thu, 18 May 2017 11:56:12 -0500 4 - Subject: [PATCH] "purity" patch for 5.0 5 - 6 - --- 7 - lib/Driver/ToolChains/Gnu.cpp | 7 ------- 8 - 1 file changed, 7 deletions(-) 9 - 10 - diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp 11 - index fe3c0191bb..c6a482bece 100644 12 - --- a/lib/Driver/ToolChains/Gnu.cpp 13 - +++ b/lib/Driver/ToolChains/Gnu.cpp 14 - @@ -487,12 +487,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 15 - if (!IsStatic) { 16 - if (Args.hasArg(options::OPT_rdynamic)) 17 - CmdArgs.push_back("-export-dynamic"); 18 - - 19 - - if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) { 20 - - CmdArgs.push_back("-dynamic-linker"); 21 - - CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + 22 - - ToolChain.getDynamicLinker(Args))); 23 - - } 24 - } 25 - 26 - CmdArgs.push_back("-o"); 27 - -- 28 - 2.11.0
-21
pkgs/development/compilers/llvm/12/compiler-rt/X86-support-extension.patch
··· 1 - diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt 2 - index 3a66dd9c3fb..7efc85d9f9f 100644 3 - --- a/lib/builtins/CMakeLists.txt 4 - +++ b/lib/builtins/CMakeLists.txt 5 - @@ -345,4 +345,8 @@ if (NOT MSVC) 6 - 7 - + set(i486_SOURCES ${i386_SOURCES}) 8 - + set(i586_SOURCES ${i386_SOURCES}) 9 - + set(i686_SOURCES ${i386_SOURCES}) 10 - + 11 - if (WIN32) 12 - set(i386_SOURCES 13 - ${i386_SOURCES} 14 - @@ -608,6 +612,7 @@ else () 15 - endif() 16 - 17 - foreach (arch ${BUILTIN_SUPPORTED_ARCH}) 18 - + message("arch: ${arch}") 19 - if (CAN_TARGET_${arch}) 20 - # For ARM archs, exclude any VFP builtins if VFP is not supported 21 - if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
-32
pkgs/development/compilers/llvm/12/compiler-rt/armv7l.patch
··· 1 - diff -ur compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2 - --- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900 3 - +++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900 4 - @@ -24,7 +24,7 @@ 5 - 6 - 7 - set(ARM64 aarch64) 8 - -set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k) 9 - +set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l) 10 - set(HEXAGON hexagon) 11 - set(X86 i386) 12 - set(X86_64 x86_64) 13 - diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 14 - --- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900 15 - +++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900 16 - @@ -474,6 +474,7 @@ 17 - set(armv7_SOURCES ${arm_SOURCES}) 18 - set(armv7s_SOURCES ${arm_SOURCES}) 19 - set(armv7k_SOURCES ${arm_SOURCES}) 20 - +set(armv7l_SOURCES ${arm_SOURCES}) 21 - set(arm64_SOURCES ${aarch64_SOURCES}) 22 - 23 - # macho_embedded archs 24 - @@ -595,7 +596,7 @@ 25 - foreach (arch ${BUILTIN_SUPPORTED_ARCH}) 26 - if (CAN_TARGET_${arch}) 27 - # For ARM archs, exclude any VFP builtins if VFP is not supported 28 - - if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$") 29 - + if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$") 30 - string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}") 31 - check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP) 32 - if(NOT COMPILER_RT_HAS_${arch}_VFP)
-33
pkgs/development/compilers/llvm/12/compiler-rt/codesign.patch
··· 1 - From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001 2 - From: Will Dietz <w@wdtz.org> 3 - Date: Tue, 19 Sep 2017 13:13:06 -0500 4 - Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that 5 - needs it 6 - 7 - --- 8 - cmake/Modules/AddCompilerRT.cmake | 8 ------ 9 - test/asan/CMakeLists.txt | 52 --------------------------------------- 10 - test/tsan/CMakeLists.txt | 47 ----------------------------------- 11 - 3 files changed, 107 deletions(-) 12 - 13 - diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake 14 - index bc5fb9ff7..b64eb4246 100644 15 - --- a/cmake/Modules/AddCompilerRT.cmake 16 - +++ b/cmake/Modules/AddCompilerRT.cmake 17 - @@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type) 18 - set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") 19 - set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") 20 - endif() 21 - - if(APPLE) 22 - - # Ad-hoc sign the dylibs 23 - - add_custom_command(TARGET ${libname} 24 - - POST_BUILD 25 - - COMMAND codesign --sign - $<TARGET_FILE:${libname}> 26 - - WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} 27 - - ) 28 - - endif() 29 - endif() 30 - install(TARGETS ${libname} 31 - ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} 32 - 2.14.1 33 -
-129
pkgs/development/compilers/llvm/12/compiler-rt/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b44ad2c2118e..d42f5664d448 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.13.4) 6 - # Check if compiler-rt is built as a standalone project. 7 - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) 8 - project(CompilerRT C CXX ASM) 9 - + include(GNUInstallDirs) 10 - set(COMPILER_RT_STANDALONE_BUILD TRUE) 11 - set_property(GLOBAL PROPERTY USE_FOLDERS ON) 12 - endif() 13 - diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake 14 - index 361538a58e47..f0d8d9ab80f1 100644 15 - --- a/cmake/Modules/AddCompilerRT.cmake 16 - +++ b/cmake/Modules/AddCompilerRT.cmake 17 - @@ -495,7 +495,7 @@ macro(add_compiler_rt_resource_file target_name file_name component) 18 - add_custom_target(${target_name} DEPENDS ${dst_file}) 19 - # Install in Clang resource directory. 20 - install(FILES ${file_name} 21 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/share 22 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR} 23 - COMPONENT ${component}) 24 - add_dependencies(${component} ${target_name}) 25 - 26 - @@ -512,7 +512,7 @@ macro(add_compiler_rt_script name) 27 - add_custom_target(${name} DEPENDS ${dst}) 28 - install(FILES ${dst} 29 - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE 30 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin) 31 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR}) 32 - endmacro(add_compiler_rt_script src name) 33 - 34 - # Builds custom version of libc++ and installs it in <prefix>. 35 - diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake 36 - index 456a8dcda59f..7a09e74c7c79 100644 37 - --- a/cmake/Modules/CompilerRTDarwinUtils.cmake 38 - +++ b/cmake/Modules/CompilerRTDarwinUtils.cmake 39 - @@ -508,7 +508,7 @@ macro(darwin_add_embedded_builtin_libraries) 40 - set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR 41 - ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded) 42 - set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR 43 - - ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded) 44 - + ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded) 45 - 46 - set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi") 47 - set(CFLAGS_i386 "-march=pentium") 48 - diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake 49 - index f61d487e93a0..f1f46fb9599c 100644 50 - --- a/cmake/Modules/CompilerRTUtils.cmake 51 - +++ b/cmake/Modules/CompilerRTUtils.cmake 52 - @@ -378,7 +378,7 @@ endfunction() 53 - function(get_compiler_rt_install_dir arch install_dir) 54 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 55 - get_compiler_rt_target(${arch} target) 56 - - set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE) 57 - + set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE) 58 - else() 59 - set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE) 60 - endif() 61 - diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake 62 - index 1edab43e7c0d..1aac6b73ff82 100644 63 - --- a/cmake/base-config-ix.cmake 64 - +++ b/cmake/base-config-ix.cmake 65 - @@ -65,11 +65,11 @@ if (LLVM_TREE_AVAILABLE) 66 - else() 67 - # Take output dir and install path from the user. 68 - set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH 69 - - "Path where built compiler-rt libraries should be stored.") 70 - + "Path where built compiler-rt build artifacts should be stored.") 71 - set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH 72 - "Path where built compiler-rt executables should be stored.") 73 - - set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH 74 - - "Path where built compiler-rt libraries should be installed.") 75 - + set(COMPILER_RT_INSTALL_PATH "" CACHE PATH 76 - + "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.") 77 - option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF) 78 - option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF) 79 - # Use a host compiler to compile/link tests. 80 - @@ -97,7 +97,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR) 81 - set(COMPILER_RT_LIBRARY_OUTPUT_DIR 82 - ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) 83 - set(COMPILER_RT_LIBRARY_INSTALL_DIR 84 - - ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR}) 85 - + ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR}) 86 - endif() 87 - 88 - if(APPLE) 89 - diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt 90 - index b00e8caa1ddd..0fe64e4862c9 100644 91 - --- a/include/CMakeLists.txt 92 - +++ b/include/CMakeLists.txt 93 - @@ -69,22 +69,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc") 94 - install(FILES ${SANITIZER_HEADERS} 95 - COMPONENT compiler-rt-headers 96 - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 97 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer) 98 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer) 99 - # Install fuzzer headers. 100 - install(FILES ${FUZZER_HEADERS} 101 - COMPONENT compiler-rt-headers 102 - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 103 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer) 104 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer) 105 - # Install xray headers. 106 - install(FILES ${XRAY_HEADERS} 107 - COMPONENT compiler-rt-headers 108 - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 109 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray) 110 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray) 111 - # Install profile headers. 112 - install(FILES ${PROFILE_HEADERS} 113 - COMPONENT compiler-rt-headers 114 - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ 115 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile) 116 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile) 117 - 118 - if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs. 119 - add_custom_target(install-compiler-rt-headers 120 - diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt 121 - index a29de8deff1b..d39ff01613d2 100644 122 - --- a/lib/dfsan/CMakeLists.txt 123 - +++ b/lib/dfsan/CMakeLists.txt 124 - @@ -57,4 +57,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename} 125 - DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt) 126 - add_dependencies(dfsan dfsan_abilist) 127 - install(FILES ${dfsan_abilist_filename} 128 - - DESTINATION ${COMPILER_RT_INSTALL_PATH}/share) 129 - + DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})
-16
pkgs/development/compilers/llvm/12/compiler-rt/normalize-var.patch
··· 1 - diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake 2 - index f1f46fb9599c..6f19e69507ba 100644 3 - --- a/cmake/Modules/CompilerRTUtils.cmake 4 - +++ b/cmake/Modules/CompilerRTUtils.cmake 5 - @@ -302,8 +302,9 @@ macro(load_llvm_config) 6 - # Get some LLVM variables from LLVMConfig. 7 - include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") 8 - 9 - - set(LLVM_LIBRARY_OUTPUT_INTDIR 10 - - ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 11 - + get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR 12 - + ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX} 13 - + REALPATH) 14 - endif() 15 - endmacro() 16 -
-34
pkgs/development/compilers/llvm/12/libunwind/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 48cb8e004e08..fec8144fb95a 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH 6 - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD) 7 - project(libunwind LANGUAGES C CXX ASM) 8 - 9 - + include(GNUInstallDirs) 10 - + 11 - set(PACKAGE_NAME libunwind) 12 - set(PACKAGE_VERSION 12.0.0) 13 - set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") 14 - @@ -115,17 +117,17 @@ set(CMAKE_MODULE_PATH 15 - 16 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 17 - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) 18 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) 19 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) 20 - if(LIBCXX_LIBDIR_SUBDIR) 21 - string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) 22 - string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) 23 - endif() 24 - elseif(LLVM_LIBRARY_OUTPUT_INTDIR) 25 - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) 26 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX}) 27 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX}) 28 - else() 29 - set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) 30 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX}) 31 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX}) 32 - endif() 33 - 34 - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
-68
pkgs/development/compilers/llvm/12/lld/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index d4e561b50d8f..cfa5bdd79c2a 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) 6 - set(CMAKE_INCLUDE_CURRENT_DIR ON) 7 - set(LLD_BUILT_STANDALONE TRUE) 8 - 9 - + include(GNUInstallDirs) 10 - + 11 - find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary") 12 - if(NOT LLVM_CONFIG_PATH) 13 - message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH") 14 - @@ -179,7 +181,7 @@ include_directories(BEFORE 15 - 16 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 17 - install(DIRECTORY include/ 18 - - DESTINATION include 19 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 20 - FILES_MATCHING 21 - PATTERN "*.h" 22 - ) 23 - diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 24 - index 23df41312403..d62372c88de7 100644 25 - --- a/cmake/modules/AddLLD.cmake 26 - +++ b/cmake/modules/AddLLD.cmake 27 - @@ -20,9 +20,9 @@ macro(add_lld_library name) 28 - install(TARGETS ${name} 29 - COMPONENT ${name} 30 - ${export_to_lldtargets} 31 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 32 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 33 - - RUNTIME DESTINATION bin) 34 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 35 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 36 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 37 - 38 - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) 39 - add_llvm_install_targets(install-${name} 40 - @@ -54,7 +54,7 @@ macro(add_lld_tool name) 41 - 42 - install(TARGETS ${name} 43 - ${export_to_lldtargets} 44 - - RUNTIME DESTINATION bin 45 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 46 - COMPONENT ${name}) 47 - 48 - if(NOT CMAKE_CONFIGURATION_TYPES) 49 - @@ -69,5 +69,5 @@ endmacro() 50 - macro(add_lld_symlink name dest) 51 - add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) 52 - # Always generate install targets 53 - - llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) 54 - + llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE) 55 - endmacro() 56 - diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt 57 - index 5cff736ff57f..64e775c771b9 100644 58 - --- a/tools/lld/CMakeLists.txt 59 - +++ b/tools/lld/CMakeLists.txt 60 - @@ -21,7 +21,7 @@ target_link_libraries(lld 61 - ) 62 - 63 - install(TARGETS lld 64 - - RUNTIME DESTINATION bin) 65 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 66 - 67 - if(NOT LLD_SYMLINKS_TO_CREATE) 68 - set(LLD_SYMLINKS_TO_CREATE
-110
pkgs/development/compilers/llvm/12/lldb/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b5633e21c56a..f2f1035e9238 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH 6 - # If we are not building as part of LLVM, build LLDB as a standalone project, 7 - # using LLVM as an external library. 8 - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) 9 - + include(GNUInstallDirs) 10 - + 11 - project(lldb) 12 - include(LLDBStandalone) 13 - 14 - diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake 15 - index 4ed5c647c5d2..89f96e710d55 100644 16 - --- a/cmake/modules/AddLLDB.cmake 17 - +++ b/cmake/modules/AddLLDB.cmake 18 - @@ -107,13 +107,13 @@ function(add_lldb_library name) 19 - endif() 20 - 21 - if(PARAM_SHARED) 22 - - set(install_dest lib${LLVM_LIBDIR_SUFFIX}) 23 - + set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 24 - if(PARAM_INSTALL_PREFIX) 25 - set(install_dest ${PARAM_INSTALL_PREFIX}) 26 - endif() 27 - # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS 28 - install(TARGETS ${name} COMPONENT ${name} 29 - - RUNTIME DESTINATION bin 30 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 31 - LIBRARY DESTINATION ${install_dest} 32 - ARCHIVE DESTINATION ${install_dest} 33 - FRAMEWORK DESTINATION ${install_dest}) 34 - diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake 35 - index 2fdf1502d055..37364341ff8b 100644 36 - --- a/cmake/modules/LLDBConfig.cmake 37 - +++ b/cmake/modules/LLDBConfig.cmake 38 - @@ -225,7 +225,7 @@ include_directories(BEFORE 39 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 40 - install(DIRECTORY include/ 41 - COMPONENT lldb-headers 42 - - DESTINATION include 43 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 44 - FILES_MATCHING 45 - PATTERN "*.h" 46 - PATTERN ".cmake" EXCLUDE 47 - @@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 48 - 49 - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ 50 - COMPONENT lldb-headers 51 - - DESTINATION include 52 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 53 - FILES_MATCHING 54 - PATTERN "*.h" 55 - PATTERN ".cmake" EXCLUDE 56 - diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt 57 - index 734167e51bc5..f95761b5df58 100644 58 - --- a/tools/intel-features/CMakeLists.txt 59 - +++ b/tools/intel-features/CMakeLists.txt 60 - @@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT) 61 - endif() 62 - 63 - install(TARGETS lldbIntelFeatures 64 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}) 65 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 66 - diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake 67 - index 752113b..010f187 100644 68 - --- a/cmake/modules/LLDBStandalone.cmake 69 - +++ b/cmake/modules/LLDBStandalone.cmake 70 - @@ -62,7 +62,7 @@ endif() 71 - 72 - # They are used as destination of target generators. 73 - set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) 74 - -set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 75 - +set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 76 - if(WIN32 OR CYGWIN) 77 - # DLL platform -- put DLLs into bin. 78 - set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) 79 - diff --git a/CMakeLists.txt b/CMakeLists.txt 80 - index b5633e2..86e4738 100644 81 - --- a/CMakeLists.txt 82 - +++ b/CMakeLists.txt 83 - @@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON) 84 - if(LLDB_BUILD_FRAMEWORK) 85 - set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb") 86 - else() 87 - - set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb") 88 - + set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb") 89 - endif() 90 - get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR) 91 - finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}") 92 - diff --git a/source/API/CMakeLists.txt b/source/API/CMakeLists.txt 93 - index b5633e2..86e4738 100644 94 - --- a/source/API/CMakeLists.txt 2024-05-30 19:08:14.241656491 -0700 95 - +++ b/source/API/CMakeLists.txt 2024-05-30 19:08:48.218219667 -0700 96 - @@ -113,14 +113,6 @@ 97 - ${option_install_prefix} 98 - ) 99 - 100 - -# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so, 101 - -# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so 102 - -# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so 103 - -# that _lldb.so can be loaded from Python. 104 - -if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE) 105 - - set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}") 106 - -endif() 107 - - 108 - if(Python3_RPATH) 109 - set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${Python3_RPATH}") 110 - set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")
-31
pkgs/development/compilers/llvm/12/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -11,21 +11,12 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - 9 - -#ifdef __ANDROID__ 10 - -#if defined(__arm64__) || defined(__aarch64__) 11 - -typedef unsigned long elf_greg_t; 12 - -typedef elf_greg_t 13 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 14 - -typedef struct user_fpsimd_state elf_fpregset_t; 15 - -#ifndef NT_FPREGSET 16 - -#define NT_FPREGSET NT_PRFPREG 17 - -#endif // NT_FPREGSET 18 - -#elif defined(__mips__) 19 - -#ifndef NT_FPREGSET 20 - -#define NT_FPREGSET NT_PRFPREG 21 - -#endif // NT_FPREGSET 22 - -#endif 23 - -#else // __ANDROID__ 24 - +#if !defined(__GLIBC__) && defined(__powerpc__) 25 - +#define pt_regs musl_pt_regs 26 - +#include <sys/procfs.h> 27 - +#undef pt_regs 28 - +#else 29 - #include <sys/procfs.h> 30 - -#endif // __ANDROID__ 31 - +#endif
-13
pkgs/development/compilers/llvm/12/lldb/resource-dir.patch
··· 1 - diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake 2 - index 37364341ff8b..7f74c1a3e257 100644 3 - --- a/cmake/modules/LLDBConfig.cmake 4 - +++ b/cmake/modules/LLDBConfig.cmake 5 - @@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers) 6 - # Iterate over the possible places where the external resource directory 7 - # could be and pick the first that exists. 8 - foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" 9 - - "${LLVM_BUILD_LIBRARY_DIR}" 10 - + "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@" 11 - "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}") 12 - # Build the resource directory path by appending 'clang/<version number>'. 13 - set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
-13
pkgs/development/compilers/llvm/12/llvm/fix-llvm-issue-49955.patch
··· 1 - diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt b/lib/CodeGen/AsmPrinter/CMakeLists.txt 2 - index eb924282..c77c140b 100644 3 - --- a/lib/CodeGen/AsmPrinter/CMakeLists.txt 4 - +++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt 5 - @@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter 6 - Support 7 - Target 8 - ) 9 - + 10 - +if (CMAKE_COMPILER_IS_GNUCXX) 11 - + set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES 12 - + COMPILE_FLAGS -fno-strict-aliasing) 13 - +endif()
-105
pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs-polly.patch
··· 1 - diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt 2 - index ca7c04c565bb..6ed5db5dd4f8 100644 3 - --- a/tools/polly/CMakeLists.txt 4 - +++ b/tools/polly/CMakeLists.txt 5 - @@ -2,7 +2,11 @@ 6 - if (NOT DEFINED LLVM_MAIN_SRC_DIR) 7 - project(Polly) 8 - cmake_minimum_required(VERSION 3.13.4) 9 - +endif() 10 - + 11 - +include(GNUInstallDirs) 12 - 13 - +if (NOT DEFINED LLVM_MAIN_SRC_DIR) 14 - # Where is LLVM installed? 15 - find_package(LLVM CONFIG REQUIRED) 16 - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR}) 17 - @@ -122,13 +126,13 @@ include_directories( 18 - 19 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 20 - install(DIRECTORY include/ 21 - - DESTINATION include 22 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 23 - FILES_MATCHING 24 - PATTERN "*.h" 25 - ) 26 - 27 - install(DIRECTORY ${POLLY_BINARY_DIR}/include/ 28 - - DESTINATION include 29 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 30 - FILES_MATCHING 31 - PATTERN "*.h" 32 - PATTERN "CMakeFiles" EXCLUDE 33 - diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt 34 - index 7cc129ba2e90..137be25e4b80 100644 35 - --- a/tools/polly/cmake/CMakeLists.txt 36 - +++ b/tools/polly/cmake/CMakeLists.txt 37 - @@ -79,18 +79,18 @@ file(GENERATE 38 - 39 - # Generate PollyConfig.cmake for the install tree. 40 - unset(POLLY_EXPORTS) 41 - -set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 42 - +set(POLLY_INSTALL_PREFIX "") 43 - set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") 44 - -set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}") 45 - -set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}") 46 - +set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}") 47 - +set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 48 - if (POLLY_BUNDLED_ISL) 49 - set(POLLY_CONFIG_INCLUDE_DIRS 50 - - "${POLLY_INSTALL_PREFIX}/include" 51 - - "${POLLY_INSTALL_PREFIX}/include/polly" 52 - + "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}" 53 - + "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly" 54 - ) 55 - else() 56 - set(POLLY_CONFIG_INCLUDE_DIRS 57 - - "${POLLY_INSTALL_PREFIX}/include" 58 - + "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}" 59 - ${ISL_INCLUDE_DIRS} 60 - ) 61 - endif() 62 - @@ -100,12 +100,12 @@ endif() 63 - foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS) 64 - get_target_property(tgt_type ${tgt} TYPE) 65 - if (tgt_type STREQUAL "EXECUTABLE") 66 - - set(tgt_prefix "bin/") 67 - + set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/") 68 - else() 69 - - set(tgt_prefix "lib/") 70 - + set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/") 71 - endif() 72 - 73 - - set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>") 74 - + set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>") 75 - file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path}) 76 - 77 - if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY") 78 - diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake 79 - index 518a09b45a42..bd9d6f5542ad 100644 80 - --- a/tools/polly/cmake/polly_macros.cmake 81 - +++ b/tools/polly/cmake/polly_macros.cmake 82 - @@ -44,8 +44,8 @@ macro(add_polly_library name) 83 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly") 84 - install(TARGETS ${name} 85 - EXPORT LLVMExports 86 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 87 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) 88 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 89 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 90 - endif() 91 - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) 92 - endmacro(add_polly_library) 93 - diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt 94 - index 8991094d92c7..178d8ad606bb 100644 95 - --- a/tools/polly/lib/External/CMakeLists.txt 96 - +++ b/tools/polly/lib/External/CMakeLists.txt 97 - @@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL) 98 - install(DIRECTORY 99 - ${ISL_SOURCE_DIR}/include/ 100 - ${ISL_BINARY_DIR}/include/ 101 - - DESTINATION include/polly 102 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly 103 - FILES_MATCHING 104 - PATTERN "*.h" 105 - PATTERN "CMakeFiles" EXCLUDE
-417
pkgs/development/compilers/llvm/12/llvm/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 277d0fe54d7b..af69c8be8745 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -256,15 +256,21 @@ if (CMAKE_BUILD_TYPE AND 6 - message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") 7 - endif() 8 - 9 - +include(GNUInstallDirs) 10 - + 11 - set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) 12 - 13 - -set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") 14 - +set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING 15 - + "Path for binary subdirectory (defaults to 'bin')") 16 - mark_as_advanced(LLVM_TOOLS_INSTALL_DIR) 17 - 18 - set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING 19 - "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)") 20 - mark_as_advanced(LLVM_UTILS_INSTALL_DIR) 21 - 22 - +set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING 23 - + "Path for CMake subdirectory (defaults to lib/cmake/llvm)" ) 24 - + 25 - # They are used as destination of target generators. 26 - set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) 27 - set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 28 - @@ -567,9 +573,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF) 29 - option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON) 30 - option (LLVM_ENABLE_BINDINGS "Build bindings." ON) 31 - 32 - -set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html" 33 - +set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html" 34 - CACHE STRING "Doxygen-generated HTML documentation install directory") 35 - -set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html" 36 - +set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html" 37 - CACHE STRING "OCamldoc-generated HTML documentation install directory") 38 - 39 - option (LLVM_BUILD_EXTERNAL_COMPILER_RT 40 - @@ -1027,7 +1033,7 @@ endif() 41 - 42 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 43 - install(DIRECTORY include/llvm include/llvm-c 44 - - DESTINATION include 45 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 46 - COMPONENT llvm-headers 47 - FILES_MATCHING 48 - PATTERN "*.def" 49 - @@ -1038,7 +1044,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 50 - ) 51 - 52 - install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c 53 - - DESTINATION include 54 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 55 - COMPONENT llvm-headers 56 - FILES_MATCHING 57 - PATTERN "*.def" 58 - @@ -1052,13 +1058,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 59 - 60 - if (LLVM_INSTALL_MODULEMAPS) 61 - install(DIRECTORY include/llvm include/llvm-c 62 - - DESTINATION include 63 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 64 - COMPONENT llvm-headers 65 - FILES_MATCHING 66 - PATTERN "module.modulemap" 67 - ) 68 - install(FILES include/llvm/module.install.modulemap 69 - - DESTINATION include/llvm 70 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm 71 - COMPONENT llvm-headers 72 - RENAME "module.extern.modulemap" 73 - ) 74 - diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 75 - index 97c9980c7de3..409e8b615f75 100644 76 - --- a/cmake/modules/AddLLVM.cmake 77 - +++ b/cmake/modules/AddLLVM.cmake 78 - @@ -804,9 +804,9 @@ macro(add_llvm_library name) 79 - 80 - install(TARGETS ${name} 81 - ${export_to_llvmexports} 82 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 83 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 84 - - RUNTIME DESTINATION bin COMPONENT ${name}) 85 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 86 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 87 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name}) 88 - 89 - if (NOT LLVM_ENABLE_IDE) 90 - add_llvm_install_targets(install-${name} 91 - @@ -1022,7 +1022,7 @@ function(process_llvm_pass_plugins) 92 - "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})") 93 - install(FILES 94 - ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake 95 - - DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} 96 - + DESTINATION ${LLVM_INSTALL_CMAKE_DIR} 97 - COMPONENT cmake-exports) 98 - 99 - set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def") 100 - @@ -1242,7 +1242,7 @@ macro(add_llvm_example name) 101 - endif() 102 - add_llvm_executable(${name} ${ARGN}) 103 - if( LLVM_BUILD_EXAMPLES ) 104 - - install(TARGETS ${name} RUNTIME DESTINATION examples) 105 - + install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) 106 - endif() 107 - set_target_properties(${name} PROPERTIES FOLDER "Examples") 108 - endmacro(add_llvm_example name) 109 - @@ -1854,7 +1854,7 @@ function(llvm_install_library_symlink name dest type) 110 - set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) 111 - set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX}) 112 - 113 - - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) 114 - + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 115 - if(WIN32 AND "${type}" STREQUAL "SHARED") 116 - set(output_dir bin) 117 - endif() 118 - @@ -1871,7 +1871,7 @@ function(llvm_install_library_symlink name dest type) 119 - endif() 120 - endfunction() 121 - 122 - -function(llvm_install_symlink name dest) 123 - +function(llvm_install_symlink name dest output_dir) 124 - cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN}) 125 - foreach(path ${CMAKE_MODULE_PATH}) 126 - if(EXISTS ${path}/LLVMInstallSymlink.cmake) 127 - @@ -1894,7 +1894,7 @@ function(llvm_install_symlink name dest) 128 - set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) 129 - 130 - install(SCRIPT ${INSTALL_SYMLINK} 131 - - CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})" 132 - + CODE "install_symlink(${full_name} ${full_dest} ${output_dir})" 133 - COMPONENT ${component}) 134 - 135 - if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE) 136 - @@ -1977,7 +1977,8 @@ function(add_llvm_tool_symlink link_name target) 137 - endif() 138 - 139 - if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS) 140 - - llvm_install_symlink(${link_name} ${target}) 141 - + GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR) 142 - + llvm_install_symlink(${link_name} ${target} ${output_dir}) 143 - endif() 144 - endif() 145 - endfunction() 146 - @@ -2100,9 +2101,9 @@ function(llvm_setup_rpath name) 147 - 148 - if (APPLE) 149 - set(_install_name_dir INSTALL_NAME_DIR "@rpath") 150 - - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 151 - + set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 152 - elseif(UNIX) 153 - - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 154 - + set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 155 - if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 156 - set_property(TARGET ${name} APPEND_STRING PROPERTY 157 - LINK_FLAGS " -Wl,-z,origin ") 158 - diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake 159 - index 554046b20edf..4d1ad980641e 100644 160 - --- a/cmake/modules/AddOCaml.cmake 161 - +++ b/cmake/modules/AddOCaml.cmake 162 - @@ -144,9 +144,9 @@ function(add_ocaml_library name) 163 - endforeach() 164 - 165 - if( APPLE ) 166 - - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 167 - + set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 168 - elseif( UNIX ) 169 - - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 170 - + set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 171 - endif() 172 - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 173 - 174 - diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake 175 - index e80c3b5c1cac..482f6d715ef5 100644 176 - --- a/cmake/modules/AddSphinxTarget.cmake 177 - +++ b/cmake/modules/AddSphinxTarget.cmake 178 - @@ -90,7 +90,7 @@ function (add_sphinx_target builder project) 179 - endif() 180 - elseif (builder STREQUAL html) 181 - string(TOUPPER "${project}" project_upper) 182 - - set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html" 183 - + set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html" 184 - CACHE STRING "HTML documentation install directory for ${project}") 185 - 186 - # '/.' indicates: copy the contents of the directory directly into 187 - diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 188 - index 505dc9a29d70..36e6c63af3f4 100644 189 - --- a/cmake/modules/CMakeLists.txt 190 - +++ b/cmake/modules/CMakeLists.txt 191 - @@ -1,4 +1,4 @@ 192 - -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) 193 - +set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')") 194 - set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") 195 - 196 - # First for users who use an installed LLVM, create the LLVMExports.cmake file. 197 - @@ -107,13 +107,13 @@ foreach(p ${_count}) 198 - set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE} 199 - get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)") 200 - endforeach(p) 201 - -set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include") 202 - +set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") 203 - set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}") 204 - set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}") 205 - -set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}") 206 - +set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") 207 - set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") 208 - set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}") 209 - -set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin") 210 - +set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") 211 - 212 - # Generate a default location for lit 213 - if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) 214 - diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake 215 - index 09fed8085c23..aa79f192abf0 100644 216 - --- a/cmake/modules/LLVMInstallSymlink.cmake 217 - +++ b/cmake/modules/LLVMInstallSymlink.cmake 218 - @@ -10,7 +10,7 @@ function(install_symlink name target outdir) 219 - set(LINK_OR_COPY copy) 220 - endif() 221 - 222 - - set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/") 223 - + set(bindir "${DESTDIR}${outdir}/") 224 - 225 - message(STATUS "Creating ${name}") 226 - 227 - diff --git a/docs/CMake.rst b/docs/CMake.rst 228 - index bb821b417ad9..6a528f7c2ad3 100644 229 - --- a/docs/CMake.rst 230 - +++ b/docs/CMake.rst 231 - @@ -196,7 +196,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``. 232 - **LLVM_LIBDIR_SUFFIX**:STRING 233 - Extra suffix to append to the directory where libraries are to be 234 - installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` 235 - - to install libraries to ``/usr/lib64``. 236 - + to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``. 237 - 238 - **CMAKE_C_FLAGS**:STRING 239 - Extra flags to use when compiling C source files. 240 - @@ -550,8 +550,8 @@ LLVM-specific variables 241 - 242 - **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING 243 - The path to install Doxygen-generated HTML documentation to. This path can 244 - - either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to 245 - - `share/doc/llvm/doxygen-html`. 246 - + either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to 247 - + `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`. 248 - 249 - **LLVM_ENABLE_SPHINX**:BOOL 250 - If specified, CMake will search for the ``sphinx-build`` executable and will make 251 - @@ -582,13 +582,33 @@ LLVM-specific variables 252 - 253 - **LLVM_INSTALL_SPHINX_HTML_DIR**:STRING 254 - The path to install Sphinx-generated HTML documentation to. This path can 255 - - either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to 256 - - `share/doc/llvm/html`. 257 - + either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to 258 - + `${CMAKE_INSTALL_DOCDIR}/${project}/html`. 259 - 260 - **LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING 261 - The path to install OCamldoc-generated HTML documentation to. This path can 262 - - either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to 263 - - `share/doc/llvm/ocaml-html`. 264 - + either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to 265 - + `${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html`. 266 - + 267 - +**CMAKE_INSTALL_BINDIR**:STRING 268 - + The path to install binary tools, relative to the ``CMAKE_INSTALL_PREFIX``. 269 - + Defaults to `bin`. 270 - + 271 - +**CMAKE_INSTALL_LIBDIR**:STRING 272 - + The path to install libraries, relative to the ``CMAKE_INSTALL_PREFIX``. 273 - + Defaults to `lib`. 274 - + 275 - +**CMAKE_INSTALL_INCLUDEDIR**:STRING 276 - + The path to install header files, relative to the ``CMAKE_INSTALL_PREFIX``. 277 - + Defaults to `include`. 278 - + 279 - +**CMAKE_INSTALL_DOCDIR**:STRING 280 - + The path to install documentation, relative to the ``CMAKE_INSTALL_PREFIX``. 281 - + Defaults to `share/doc`. 282 - + 283 - +**CMAKE_INSTALL_MANDIR**:STRING 284 - + The path to install manpage files, relative to the ``CMAKE_INSTALL_PREFIX``. 285 - + Defaults to `share/man`. 286 - 287 - **LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL 288 - macOS Only: If enabled CMake will generate a target named 289 - @@ -786,9 +806,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``). 290 - 291 - This file is available in two different locations. 292 - 293 - -* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where 294 - - ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM. 295 - - On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. 296 - +* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where 297 - + ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are 298 - + installed as part of an installed version of LLVM. This is typically 299 - + ``cmake/llvm/`` within the lib directory. On Linux, this is typically 300 - + ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. 301 - 302 - * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where 303 - ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only 304 - diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt 305 - index bb96edb4b4bf..678c22fb43c8 100644 306 - --- a/examples/Bye/CMakeLists.txt 307 - +++ b/examples/Bye/CMakeLists.txt 308 - @@ -14,6 +14,6 @@ if (NOT WIN32) 309 - BUILDTREE_ONLY 310 - ) 311 - 312 - - install(TARGETS ${name} RUNTIME DESTINATION examples) 313 - + install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) 314 - set_target_properties(${name} PROPERTIES FOLDER "Examples") 315 - endif() 316 - diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt 317 - index b46319f24fc8..2feabd1954e4 100644 318 - --- a/include/llvm/CMakeLists.txt 319 - +++ b/include/llvm/CMakeLists.txt 320 - @@ -5,5 +5,5 @@ add_subdirectory(Frontend) 321 - # If we're doing an out-of-tree build, copy a module map for generated 322 - # header files into the build area. 323 - if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 324 - - configure_file(module.modulemap.build module.modulemap COPYONLY) 325 - + configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY) 326 - endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 327 - diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 328 - index ebe5b73a5c65..70c497be12f5 100644 329 - --- a/tools/llvm-config/BuildVariables.inc.in 330 - +++ b/tools/llvm-config/BuildVariables.inc.in 331 - @@ -23,6 +23,10 @@ 332 - #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" 333 - #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" 334 - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" 335 - +#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@" 336 - +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" 337 - +#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" 338 - +#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@" 339 - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" 340 - #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" 341 - #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@" 342 - diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 343 - index 1a2f04552d13..44fa7d3eec6b 100644 344 - --- a/tools/llvm-config/llvm-config.cpp 345 - +++ b/tools/llvm-config/llvm-config.cpp 346 - @@ -357,12 +357,26 @@ int main(int argc, char **argv) { 347 - ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include"); 348 - } else { 349 - ActivePrefix = CurrentExecPrefix; 350 - - ActiveIncludeDir = ActivePrefix + "/include"; 351 - - SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR)); 352 - - sys::fs::make_absolute(ActivePrefix, path); 353 - - ActiveBinDir = std::string(path.str()); 354 - - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; 355 - - ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; 356 - + { 357 - + SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR)); 358 - + sys::fs::make_absolute(ActivePrefix, path); 359 - + ActiveIncludeDir = std::string(path.str()); 360 - + } 361 - + { 362 - + SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR)); 363 - + sys::fs::make_absolute(ActivePrefix, path); 364 - + ActiveBinDir = std::string(path.str()); 365 - + } 366 - + { 367 - + SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX)); 368 - + sys::fs::make_absolute(ActivePrefix, path); 369 - + ActiveLibDir = std::string(path.str()); 370 - + } 371 - + { 372 - + SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR)); 373 - + sys::fs::make_absolute(ActivePrefix, path); 374 - + ActiveCMakeDir = std::string(path.str()); 375 - + } 376 - ActiveIncludeOption = "-I" + ActiveIncludeDir; 377 - } 378 - 379 - diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt 380 - index 2963f97cad88..69d66c9c9ca1 100644 381 - --- a/tools/lto/CMakeLists.txt 382 - +++ b/tools/lto/CMakeLists.txt 383 - @@ -25,7 +25,7 @@ add_llvm_library(LTO SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS 384 - intrinsics_gen) 385 - 386 - install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h 387 - - DESTINATION include/llvm-c 388 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c 389 - COMPONENT LTO) 390 - 391 - if (APPLE) 392 - diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt 393 - index ead73ec13a8f..250362021f17 100644 394 - --- a/tools/opt-viewer/CMakeLists.txt 395 - +++ b/tools/opt-viewer/CMakeLists.txt 396 - @@ -8,7 +8,7 @@ set (files 397 - 398 - foreach (file ${files}) 399 - install(PROGRAMS ${file} 400 - - DESTINATION share/opt-viewer 401 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer 402 - COMPONENT opt-viewer) 403 - endforeach (file) 404 - 405 - diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt 406 - index 865436247270..ce1daa62f6ab 100644 407 - --- a/tools/remarks-shlib/CMakeLists.txt 408 - +++ b/tools/remarks-shlib/CMakeLists.txt 409 - @@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC) 410 - endif() 411 - 412 - install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h 413 - - DESTINATION include/llvm-c 414 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c 415 - COMPONENT Remarks) 416 - 417 - if (APPLE)
-19
pkgs/development/compilers/llvm/12/llvm/no-pipes.patch
··· 1 - diff --git a/test/Bindings/Go/lit.local.cfg b/test/Bindings/Go/lit.local.cfg 2 - index 91a0ad89..4da83a1a 100644 3 - --- a/test/Bindings/Go/lit.local.cfg 4 - +++ b/test/Bindings/Go/lit.local.cfg 5 - @@ -1,5 +1,4 @@ 6 - import os 7 - -import pipes 8 - import shlex 9 - import sys 10 - 11 - @@ -56,7 +55,7 @@ def fixup_compiler_path(compiler): 12 - except (AttributeError, OSError): 13 - pass 14 - 15 - - return ' '.join([pipes.quote(arg) for arg in args]) 16 - + return ' '.join([shlex.quote(arg) for arg in args]) 17 - 18 - config.environment['CC'] = fixup_compiler_path(config.host_cc) 19 - config.environment['CXX'] = fixup_compiler_path(config.host_cxx)
-78
pkgs/development/compilers/llvm/13/clang/revert-malloc-alignment-assumption.patch
··· 1 - --- b/include/clang/Basic/TargetInfo.h 2 - +++ a/include/clang/Basic/TargetInfo.h 3 - @@ -612,8 +612,8 @@ 4 - } 5 - 6 - /// Return the largest alignment for which a suitably-sized allocation with 7 - + /// '::operator new(size_t)' is guaranteed to produce a correctly-aligned 8 - + /// pointer. 9 - - /// '::operator new(size_t)' or 'malloc' is guaranteed to produce a 10 - - /// correctly-aligned pointer. 11 - unsigned getNewAlign() const { 12 - return NewAlign ? NewAlign : std::max(LongDoubleAlign, LongLongAlign); 13 - } 14 - --- b/lib/CodeGen/CGCall.cpp 15 - +++ a/lib/CodeGen/CGCall.cpp 16 - @@ -2048,24 +2048,6 @@ 17 - // allows it to work on indirect virtual function calls. 18 - if (AttrOnCallSite && TargetDecl->hasAttr<NoMergeAttr>()) 19 - FuncAttrs.addAttribute(llvm::Attribute::NoMerge); 20 - - 21 - - // Add known guaranteed alignment for allocation functions. 22 - - if (unsigned BuiltinID = Fn->getBuiltinID()) { 23 - - switch (BuiltinID) { 24 - - case Builtin::BIaligned_alloc: 25 - - case Builtin::BIcalloc: 26 - - case Builtin::BImalloc: 27 - - case Builtin::BImemalign: 28 - - case Builtin::BIrealloc: 29 - - case Builtin::BIstrdup: 30 - - case Builtin::BIstrndup: 31 - - RetAttrs.addAlignmentAttr(Context.getTargetInfo().getNewAlign() / 32 - - Context.getTargetInfo().getCharWidth()); 33 - - break; 34 - - default: 35 - - break; 36 - - } 37 - - } 38 - } 39 - 40 - // 'const', 'pure' and 'noalias' attributed functions are also nounwind. 41 - --- b/test/CodeGen/alloc-fns-alignment.c 42 - +++ /dev/null 43 - @@ -1,35 +0,0 @@ 44 - -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16 45 - -// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16 46 - -// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16 47 - -// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN8 48 - -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-malloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-MALLOC 49 - -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-calloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-CALLOC 50 - -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-realloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-REALLOC 51 - - 52 - -typedef __SIZE_TYPE__ size_t; 53 - - 54 - -void *malloc(size_t); 55 - -void *calloc(size_t, size_t); 56 - -void *realloc(void *, size_t); 57 - - 58 - -void *malloc_test(size_t n) { 59 - - return malloc(n); 60 - -} 61 - - 62 - -void *calloc_test(size_t n) { 63 - - return calloc(1, n); 64 - -} 65 - - 66 - -void *raalloc_test(void *p, size_t n) { 67 - - return realloc(p, n); 68 - -} 69 - - 70 - -// ALIGN16: align 16 i8* @malloc 71 - -// ALIGN16: align 16 i8* @calloc 72 - -// ALIGN16: align 16 i8* @realloc 73 - -// ALIGN8: align 8 i8* @malloc 74 - -// ALIGN8: align 8 i8* @calloc 75 - -// ALIGN8: align 8 i8* @realloc 76 - -// NOBUILTIN-MALLOC: declare i8* @malloc 77 - -// NOBUILTIN-CALLOC: declare i8* @calloc 78 - -// NOBUILTIN-REALLOC: declare i8* @realloc
-31
pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch
··· 1 - diff -ur compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2 - --- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900 3 - +++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900 4 - @@ -37,6 +37,6 @@ 5 - 6 - set(ARM64 aarch64) 7 - -set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv8m.main armv8.1m.main) 8 - +set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l armv8m.main armv8.1m.main) 9 - set(HEXAGON hexagon) 10 - set(X86 i386) 11 - set(X86_64 x86_64) 12 - diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 13 - --- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900 14 - +++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900 15 - @@ -555,6 +555,7 @@ 16 - set(armv7_SOURCES ${arm_SOURCES}) 17 - set(armv7s_SOURCES ${arm_SOURCES}) 18 - set(armv7k_SOURCES ${arm_SOURCES}) 19 - +set(armv7l_SOURCES ${arm_SOURCES}) 20 - set(arm64_SOURCES ${aarch64_SOURCES}) 21 - 22 - # macho_embedded archs 23 - @@ -705,7 +705,7 @@ 24 - foreach (arch ${BUILTIN_SUPPORTED_ARCH}) 25 - if (CAN_TARGET_${arch}) 26 - # For ARM archs, exclude any VFP builtins if VFP is not supported 27 - - if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em|armv8m.main|armv8.1m.main)$") 28 - + if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em|armv8m.main|armv8.1m.main)$") 29 - string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}") 30 - check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP) 31 - if(NOT COMPILER_RT_HAS_${arch}_VFP)
-33
pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch
··· 1 - From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001 2 - From: Will Dietz <w@wdtz.org> 3 - Date: Tue, 19 Sep 2017 13:13:06 -0500 4 - Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that 5 - needs it 6 - 7 - --- 8 - cmake/Modules/AddCompilerRT.cmake | 8 ------ 9 - test/asan/CMakeLists.txt | 52 --------------------------------------- 10 - test/tsan/CMakeLists.txt | 47 ----------------------------------- 11 - 3 files changed, 107 deletions(-) 12 - 13 - diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake 14 - index bc69ec95c419..9f100fdcec2f 100644 15 - --- a/cmake/Modules/AddCompilerRT.cmake 16 - +++ b/cmake/Modules/AddCompilerRT.cmake 17 - @@ -366,14 +366,6 @@ function(add_compiler_rt_runtime name type) 18 - set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") 19 - set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") 20 - endif() 21 - - if(APPLE) 22 - - # Ad-hoc sign the dylibs 23 - - add_custom_command(TARGET ${libname} 24 - - POST_BUILD 25 - - COMMAND codesign --sign - $<TARGET_FILE:${libname}> 26 - - WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR} 27 - - ) 28 - - endif() 29 - endif() 30 - 31 - set(parent_target_arg) 32 - 2.14.1 33 -
-71
pkgs/development/compilers/llvm/13/compiler-rt/darwin-targetconditionals.patch
··· 1 - diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp 2 - --- a/lib/sanitizer_common/sanitizer_mac.cpp 3 - +++ b/lib/sanitizer_common/sanitizer_mac.cpp 4 - @@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) { 5 - // Offset example: 6 - // XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4 7 - constexpr u16 GetOSMajorKernelOffset() { 8 - - if (TARGET_OS_OSX) return 4; 9 - - if (TARGET_OS_IOS || TARGET_OS_TV) return 6; 10 - - if (TARGET_OS_WATCH) return 13; 11 - +#if TARGET_OS_OSX 12 - + return 4; 13 - +#endif 14 - +#if TARGET_OS_IOS || TARGET_OS_TV 15 - + return 6; 16 - +#endif 17 - +#if TARGET_OS_WATCH 18 - + return 13; 19 - +#endif 20 - } 21 - 22 - using VersStr = char[64]; 23 - @@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) { 24 - u16 os_major = kernel_major - offset; 25 - 26 - const char *format = "%d.0"; 27 - - if (TARGET_OS_OSX) { 28 - - if (os_major >= 16) { // macOS 11+ 29 - - os_major -= 5; 30 - - } else { // macOS 10.15 and below 31 - - format = "10.%d"; 32 - - } 33 - +#if TARGET_OS_OSX 34 - + if (os_major >= 16) { // macOS 11+ 35 - + os_major -= 5; 36 - + } else { // macOS 10.15 and below 37 - + format = "10.%d"; 38 - } 39 - +#endif 40 - return internal_snprintf(vers, sizeof(VersStr), format, os_major); 41 - } 42 - 43 - @@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) { 44 - // Aligned versions example: 45 - // macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6 46 - static void MapToMacos(u16 *major, u16 *minor) { 47 - - if (TARGET_OS_OSX) 48 - - return; 49 - - 50 - - if (TARGET_OS_IOS || TARGET_OS_TV) 51 - +#if !TARGET_OS_OSX 52 - +#if TARGET_OS_IOS || TARGET_OS_TV 53 - *major += 2; 54 - - else if (TARGET_OS_WATCH) 55 - +#elif TARGET_OS_WATCH 56 - *major += 9; 57 - - else 58 - +#else 59 - UNREACHABLE("unsupported platform"); 60 - +#endif 61 - 62 - if (*major >= 16) { // macOS 11+ 63 - *major -= 5; 64 - @@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) { 65 - *minor = *major; 66 - *major = 10; 67 - } 68 - +#endif 69 - } 70 - 71 - static MacosVersion GetMacosAlignedVersionInternal() {
-36
pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 81eddbc24879..e2afb2002150 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH 6 - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD) 7 - project(libunwind LANGUAGES C CXX ASM) 8 - 9 - + include(GNUInstallDirs) 10 - + 11 - set(PACKAGE_NAME libunwind) 12 - set(PACKAGE_VERSION 13.0.0git) 13 - set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") 14 - @@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH 15 - 16 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 17 - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) 18 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH 19 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH 20 - "Path where built libunwind libraries should be installed.") 21 - if(LIBCXX_LIBDIR_SUBDIR) 22 - string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) 23 - @@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 24 - endif() 25 - elseif(LLVM_LIBRARY_OUTPUT_INTDIR) 26 - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) 27 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH 28 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH 29 - "Path where built libunwind libraries should be installed.") 30 - else() 31 - set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) 32 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH 33 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH 34 - "Path where built libunwind libraries should be installed.") 35 - endif() 36 -
-110
pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b5633e21c56a..f2f1035e9238 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH 6 - # If we are not building as part of LLVM, build LLDB as a standalone project, 7 - # using LLVM as an external library. 8 - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) 9 - + include(GNUInstallDirs) 10 - + 11 - project(lldb) 12 - include(LLDBStandalone) 13 - 14 - diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake 15 - index 4ed5c647c5d2..89f96e710d55 100644 16 - --- a/cmake/modules/AddLLDB.cmake 17 - +++ b/cmake/modules/AddLLDB.cmake 18 - @@ -107,13 +107,13 @@ function(add_lldb_library name) 19 - endif() 20 - 21 - if(PARAM_SHARED) 22 - - set(install_dest lib${LLVM_LIBDIR_SUFFIX}) 23 - + set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 24 - if(PARAM_INSTALL_PREFIX) 25 - set(install_dest ${PARAM_INSTALL_PREFIX}) 26 - endif() 27 - # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS 28 - install(TARGETS ${name} COMPONENT ${name} 29 - - RUNTIME DESTINATION bin 30 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 31 - LIBRARY DESTINATION ${install_dest} 32 - ARCHIVE DESTINATION ${install_dest} 33 - FRAMEWORK DESTINATION ${install_dest}) 34 - diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake 35 - index 2fdf1502d055..37364341ff8b 100644 36 - --- a/cmake/modules/LLDBConfig.cmake 37 - +++ b/cmake/modules/LLDBConfig.cmake 38 - @@ -225,7 +225,7 @@ include_directories(BEFORE 39 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 40 - install(DIRECTORY include/ 41 - COMPONENT lldb-headers 42 - - DESTINATION include 43 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 44 - FILES_MATCHING 45 - PATTERN "*.h" 46 - PATTERN ".cmake" EXCLUDE 47 - @@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 48 - 49 - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ 50 - COMPONENT lldb-headers 51 - - DESTINATION include 52 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 53 - FILES_MATCHING 54 - PATTERN "*.h" 55 - PATTERN ".cmake" EXCLUDE 56 - diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt 57 - index 734167e51bc5..f95761b5df58 100644 58 - --- a/tools/intel-features/CMakeLists.txt 59 - +++ b/tools/intel-features/CMakeLists.txt 60 - @@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT) 61 - endif() 62 - 63 - install(TARGETS lldbIntelFeatures 64 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}) 65 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 66 - diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake 67 - index 752113b..010f187 100644 68 - --- a/cmake/modules/LLDBStandalone.cmake 69 - +++ b/cmake/modules/LLDBStandalone.cmake 70 - @@ -62,7 +62,7 @@ endif() 71 - 72 - # They are used as destination of target generators. 73 - set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) 74 - -set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 75 - +set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 76 - if(WIN32 OR CYGWIN) 77 - # DLL platform -- put DLLs into bin. 78 - set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) 79 - diff --git a/CMakeLists.txt b/CMakeLists.txt 80 - index b5633e2..86e4738 100644 81 - --- a/CMakeLists.txt 82 - +++ b/CMakeLists.txt 83 - @@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON) 84 - if(LLDB_BUILD_FRAMEWORK) 85 - set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb") 86 - else() 87 - - set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb") 88 - + set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb") 89 - endif() 90 - get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR) 91 - finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}") 92 - diff --git a/source/API/CMakeLists.txt b/source/API/CMakeLists.txt 93 - index b5633e2..86e4738 100644 94 - --- a/source/API/CMakeLists.txt 2024-05-30 21:38:39.829955586 -0700 95 - +++ b/source/API/CMakeLists.txt 2024-05-30 21:38:48.015673758 -0700 96 - @@ -112,14 +112,6 @@ 97 - ${option_install_prefix} 98 - ) 99 - 100 - -# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so, 101 - -# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so 102 - -# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so 103 - -# that _lldb.so can be loaded from Python. 104 - -if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE) 105 - - set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}") 106 - -endif() 107 - - 108 - if(Python3_RPATH) 109 - set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${Python3_RPATH}") 110 - set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")
-381
pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 135036f509d2..265c36f8211b 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -270,15 +270,21 @@ if (CMAKE_BUILD_TYPE AND 6 - message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") 7 - endif() 8 - 9 - +include(GNUInstallDirs) 10 - + 11 - set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) 12 - 13 - -set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") 14 - +set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING 15 - + "Path for binary subdirectory (defaults to 'bin')") 16 - mark_as_advanced(LLVM_TOOLS_INSTALL_DIR) 17 - 18 - set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING 19 - "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)") 20 - mark_as_advanced(LLVM_UTILS_INSTALL_DIR) 21 - 22 - +set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING 23 - + "Path for CMake subdirectory (defaults to lib/cmake/llvm)" ) 24 - + 25 - # They are used as destination of target generators. 26 - set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) 27 - set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 28 - @@ -581,9 +587,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF) 29 - option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON) 30 - option (LLVM_ENABLE_BINDINGS "Build bindings." ON) 31 - 32 - -set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html" 33 - +set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html" 34 - CACHE STRING "Doxygen-generated HTML documentation install directory") 35 - -set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html" 36 - +set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html" 37 - CACHE STRING "OCamldoc-generated HTML documentation install directory") 38 - 39 - option (LLVM_BUILD_EXTERNAL_COMPILER_RT 40 - @@ -1048,7 +1054,7 @@ endif() 41 - 42 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 43 - install(DIRECTORY include/llvm include/llvm-c 44 - - DESTINATION include 45 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 46 - COMPONENT llvm-headers 47 - FILES_MATCHING 48 - PATTERN "*.def" 49 - @@ -1059,7 +1065,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 50 - ) 51 - 52 - install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c 53 - - DESTINATION include 54 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 55 - COMPONENT llvm-headers 56 - FILES_MATCHING 57 - PATTERN "*.def" 58 - @@ -1073,13 +1079,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) 59 - 60 - if (LLVM_INSTALL_MODULEMAPS) 61 - install(DIRECTORY include/llvm include/llvm-c 62 - - DESTINATION include 63 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 64 - COMPONENT llvm-headers 65 - FILES_MATCHING 66 - PATTERN "module.modulemap" 67 - ) 68 - install(FILES include/llvm/module.install.modulemap 69 - - DESTINATION include/llvm 70 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm 71 - COMPONENT llvm-headers 72 - RENAME "module.extern.modulemap" 73 - ) 74 - diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 75 - index 9c2b85374307..5531ceeb2eeb 100644 76 - --- a/cmake/modules/AddLLVM.cmake 77 - +++ b/cmake/modules/AddLLVM.cmake 78 - @@ -818,9 +818,9 @@ macro(add_llvm_library name) 79 - get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) 80 - install(TARGETS ${name} 81 - ${export_to_llvmexports} 82 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 83 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 84 - - RUNTIME DESTINATION bin COMPONENT ${name}) 85 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 86 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 87 - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name}) 88 - 89 - if (NOT LLVM_ENABLE_IDE) 90 - add_llvm_install_targets(install-${name} 91 - @@ -1036,7 +1036,7 @@ function(process_llvm_pass_plugins) 92 - "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})") 93 - install(FILES 94 - ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake 95 - - DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} 96 - + DESTINATION ${LLVM_INSTALL_CMAKE_DIR} 97 - COMPONENT cmake-exports) 98 - 99 - set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def") 100 - @@ -1250,7 +1250,7 @@ macro(add_llvm_example name) 101 - endif() 102 - add_llvm_executable(${name} ${ARGN}) 103 - if( LLVM_BUILD_EXAMPLES ) 104 - - install(TARGETS ${name} RUNTIME DESTINATION examples) 105 - + install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) 106 - endif() 107 - set_target_properties(${name} PROPERTIES FOLDER "Examples") 108 - endmacro(add_llvm_example name) 109 - @@ -1868,7 +1868,7 @@ function(llvm_install_library_symlink name dest type) 110 - set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) 111 - set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX}) 112 - 113 - - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) 114 - + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 115 - if(WIN32 AND "${type}" STREQUAL "SHARED") 116 - set(output_dir bin) 117 - endif() 118 - @@ -1879,7 +1879,7 @@ function(llvm_install_library_symlink name dest type) 119 - 120 - endfunction() 121 - 122 - -function(llvm_install_symlink name dest) 123 - +function(llvm_install_symlink name dest output_dir) 124 - cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN}) 125 - foreach(path ${CMAKE_MODULE_PATH}) 126 - if(EXISTS ${path}/LLVMInstallSymlink.cmake) 127 - @@ -1902,7 +1902,7 @@ function(llvm_install_symlink name dest) 128 - set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) 129 - 130 - install(SCRIPT ${INSTALL_SYMLINK} 131 - - CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})" 132 - + CODE "install_symlink(${full_name} ${full_dest} ${output_dir})" 133 - COMPONENT ${component}) 134 - 135 - if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE) 136 - @@ -1985,7 +1985,8 @@ function(add_llvm_tool_symlink link_name target) 137 - endif() 138 - 139 - if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS) 140 - - llvm_install_symlink(${link_name} ${target}) 141 - + GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR) 142 - + llvm_install_symlink(${link_name} ${target} ${output_dir}) 143 - endif() 144 - endif() 145 - endfunction() 146 - @@ -2114,9 +2115,9 @@ function(llvm_setup_rpath name) 147 - # Since BUILD_SHARED_LIBS is only recommended for use by developers, 148 - # hardcode the rpath to build/install lib dir first in this mode. 149 - # FIXME: update this when there is better solution. 150 - - set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 151 - + set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 152 - elseif(UNIX) 153 - - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 154 - + set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 155 - if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 156 - set_property(TARGET ${name} APPEND_STRING PROPERTY 157 - LINK_FLAGS " -Wl,-z,origin ") 158 - diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake 159 - index 554046b20edf..4d1ad980641e 100644 160 - --- a/cmake/modules/AddOCaml.cmake 161 - +++ b/cmake/modules/AddOCaml.cmake 162 - @@ -144,9 +144,9 @@ function(add_ocaml_library name) 163 - endforeach() 164 - 165 - if( APPLE ) 166 - - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 167 - + set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 168 - elseif( UNIX ) 169 - - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 170 - + set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 171 - endif() 172 - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 173 - 174 - diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake 175 - index e80c3b5c1cac..482f6d715ef5 100644 176 - --- a/cmake/modules/AddSphinxTarget.cmake 177 - +++ b/cmake/modules/AddSphinxTarget.cmake 178 - @@ -90,7 +90,7 @@ function (add_sphinx_target builder project) 179 - endif() 180 - elseif (builder STREQUAL html) 181 - string(TOUPPER "${project}" project_upper) 182 - - set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html" 183 - + set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html" 184 - CACHE STRING "HTML documentation install directory for ${project}") 185 - 186 - # '/.' indicates: copy the contents of the directory directly into 187 - diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 188 - index 51b6a4fdc284..4adc2acfc074 100644 189 - --- a/cmake/modules/CMakeLists.txt 190 - +++ b/cmake/modules/CMakeLists.txt 191 - @@ -1,6 +1,6 @@ 192 - include(LLVMDistributionSupport) 193 - 194 - -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) 195 - +set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')") 196 - set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") 197 - 198 - # First for users who use an installed LLVM, create the LLVMExports.cmake file. 199 - @@ -109,13 +109,13 @@ foreach(p ${_count}) 200 - set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE} 201 - get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)") 202 - endforeach(p) 203 - -set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include") 204 - +set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") 205 - set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}") 206 - set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}") 207 - -set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}") 208 - +set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") 209 - set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}") 210 - set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}") 211 - -set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin") 212 - +set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") 213 - 214 - # Generate a default location for lit 215 - if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) 216 - diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake 217 - index 3e6a2c9a2648..52e14d955c60 100644 218 - --- a/cmake/modules/LLVMInstallSymlink.cmake 219 - +++ b/cmake/modules/LLVMInstallSymlink.cmake 220 - @@ -4,7 +4,7 @@ 221 - 222 - function(install_symlink name target outdir) 223 - set(DESTDIR $ENV{DESTDIR}) 224 - - set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/") 225 - + set(bindir "${DESTDIR}${outdir}/") 226 - 227 - message(STATUS "Creating ${name}") 228 - 229 - diff --git a/docs/CMake.rst b/docs/CMake.rst 230 - index f1ac2c7d4934..c6e1469b5e13 100644 231 - --- a/docs/CMake.rst 232 - +++ b/docs/CMake.rst 233 - @@ -202,7 +202,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``. 234 - **LLVM_LIBDIR_SUFFIX**:STRING 235 - Extra suffix to append to the directory where libraries are to be 236 - installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` 237 - - to install libraries to ``/usr/lib64``. 238 - + to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``. 239 - 240 - Rarely-used CMake variables 241 - --------------------------- 242 - @@ -551,8 +551,8 @@ LLVM-specific variables 243 - 244 - **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING 245 - The path to install Doxygen-generated HTML documentation to. This path can 246 - - either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to 247 - - `share/doc/llvm/doxygen-html`. 248 - + either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to 249 - + `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`. 250 - 251 - **LLVM_LINK_LLVM_DYLIB**:BOOL 252 - If enabled, tools will be linked with the libLLVM shared library. Defaults 253 - @@ -792,9 +792,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``). 254 - 255 - This file is available in two different locations. 256 - 257 - -* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where 258 - - ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM. 259 - - On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. 260 - +* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where 261 - + ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are 262 - + installed as part of an installed version of LLVM. This is typically 263 - + ``cmake/llvm/`` within the lib directory. On Linux, this is typically 264 - + ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. 265 - 266 - * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where 267 - ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only 268 - diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt 269 - index bb96edb4b4bf..678c22fb43c8 100644 270 - --- a/examples/Bye/CMakeLists.txt 271 - +++ b/examples/Bye/CMakeLists.txt 272 - @@ -14,6 +14,6 @@ if (NOT WIN32) 273 - BUILDTREE_ONLY 274 - ) 275 - 276 - - install(TARGETS ${name} RUNTIME DESTINATION examples) 277 - + install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) 278 - set_target_properties(${name} PROPERTIES FOLDER "Examples") 279 - endif() 280 - diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt 281 - index b46319f24fc8..2feabd1954e4 100644 282 - --- a/include/llvm/CMakeLists.txt 283 - +++ b/include/llvm/CMakeLists.txt 284 - @@ -5,5 +5,5 @@ add_subdirectory(Frontend) 285 - # If we're doing an out-of-tree build, copy a module map for generated 286 - # header files into the build area. 287 - if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 288 - - configure_file(module.modulemap.build module.modulemap COPYONLY) 289 - + configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY) 290 - endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 291 - diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 292 - index ebe5b73a5c65..70c497be12f5 100644 293 - --- a/tools/llvm-config/BuildVariables.inc.in 294 - +++ b/tools/llvm-config/BuildVariables.inc.in 295 - @@ -23,6 +23,10 @@ 296 - #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" 297 - #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" 298 - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" 299 - +#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@" 300 - +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" 301 - +#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" 302 - +#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@" 303 - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" 304 - #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" 305 - #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@" 306 - diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 307 - index 1a2f04552d13..44fa7d3eec6b 100644 308 - --- a/tools/llvm-config/llvm-config.cpp 309 - +++ b/tools/llvm-config/llvm-config.cpp 310 - @@ -357,12 +357,26 @@ int main(int argc, char **argv) { 311 - ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include"); 312 - } else { 313 - ActivePrefix = CurrentExecPrefix; 314 - - ActiveIncludeDir = ActivePrefix + "/include"; 315 - - SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR)); 316 - - sys::fs::make_absolute(ActivePrefix, path); 317 - - ActiveBinDir = std::string(path.str()); 318 - - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; 319 - - ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; 320 - + { 321 - + SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR)); 322 - + sys::fs::make_absolute(ActivePrefix, path); 323 - + ActiveIncludeDir = std::string(path.str()); 324 - + } 325 - + { 326 - + SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR)); 327 - + sys::fs::make_absolute(ActivePrefix, path); 328 - + ActiveBinDir = std::string(path.str()); 329 - + } 330 - + { 331 - + SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX)); 332 - + sys::fs::make_absolute(ActivePrefix, path); 333 - + ActiveLibDir = std::string(path.str()); 334 - + } 335 - + { 336 - + SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR)); 337 - + sys::fs::make_absolute(ActivePrefix, path); 338 - + ActiveCMakeDir = std::string(path.str()); 339 - + } 340 - ActiveIncludeOption = "-I" + ActiveIncludeDir; 341 - } 342 - 343 - diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt 344 - index 0af29ad762c5..37b99b83e35c 100644 345 - --- a/tools/lto/CMakeLists.txt 346 - +++ b/tools/lto/CMakeLists.txt 347 - @@ -33,7 +33,7 @@ add_llvm_library(${LTO_LIBRARY_NAME} ${LTO_LIBRARY_TYPE} INSTALL_WITH_TOOLCHAIN 348 - ${SOURCES} DEPENDS intrinsics_gen) 349 - 350 - install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h 351 - - DESTINATION include/llvm-c 352 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c 353 - COMPONENT LTO) 354 - 355 - if (APPLE) 356 - diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt 357 - index ead73ec13a8f..250362021f17 100644 358 - --- a/tools/opt-viewer/CMakeLists.txt 359 - +++ b/tools/opt-viewer/CMakeLists.txt 360 - @@ -8,7 +8,7 @@ set (files 361 - 362 - foreach (file ${files}) 363 - install(PROGRAMS ${file} 364 - - DESTINATION share/opt-viewer 365 - + DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer 366 - COMPONENT opt-viewer) 367 - endforeach (file) 368 - 369 - diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt 370 - index 865436247270..ce1daa62f6ab 100644 371 - --- a/tools/remarks-shlib/CMakeLists.txt 372 - +++ b/tools/remarks-shlib/CMakeLists.txt 373 - @@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC) 374 - endif() 375 - 376 - install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h 377 - - DESTINATION include/llvm-c 378 - + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c 379 - COMPONENT Remarks) 380 - 381 - if (APPLE)
-50
pkgs/development/compilers/llvm/14/clang/gnu-install-dirs.patch
··· 1 - diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 2 - index 9bbbfc032b7d..947bd0da865d 100644 3 - --- a/cmake/modules/AddClang.cmake 4 - +++ b/cmake/modules/AddClang.cmake 5 - @@ -119,8 +119,8 @@ macro(add_clang_library name) 6 - install(TARGETS ${lib} 7 - COMPONENT ${lib} 8 - ${export_to_clangtargets} 9 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 10 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 11 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 12 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 13 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 14 - 15 - if (NOT LLVM_ENABLE_IDE) 16 - @@ -175,7 +175,7 @@ endmacro() 17 - macro(add_clang_symlink name dest) 18 - add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) 19 - # Always generate install targets 20 - - llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) 21 - + llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE) 22 - endmacro() 23 - 24 - function(clang_target_link_libraries target type) 25 - diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt 26 - index 078988980c52..14b58614b40a 100644 27 - --- a/lib/Headers/CMakeLists.txt 28 - +++ b/lib/Headers/CMakeLists.txt 29 - @@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES 30 - FOLDER "Misc" 31 - RUNTIME_OUTPUT_DIRECTORY "${output_dir}") 32 - 33 - -set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 34 - +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 35 - 36 - install( 37 - FILES ${files} ${generated_files} 38 - diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt 39 - index 4e0647971ab4..68dd67fcc476 100644 40 - --- a/tools/libclang/CMakeLists.txt 41 - +++ b/tools/libclang/CMakeLists.txt 42 - @@ -216,7 +216,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) 43 - COMPONENT 44 - libclang-python-bindings 45 - DESTINATION 46 - - "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 47 - + "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 48 - endforeach() 49 - if(NOT LLVM_ENABLE_IDE) 50 - add_custom_target(libclang-python-bindings)
-65
pkgs/development/compilers/llvm/14/compiler-rt/armv6-scudo-libatomic.patch
··· 1 - From a56bb19a9dc303a50ef12d83cd24c2395bf81076 Mon Sep 17 00:00:00 2001 2 - From: Ben Wolsieffer <benwolsieffer@gmail.com> 3 - Date: Wed, 7 Dec 2022 21:25:46 -0500 4 - Subject: [PATCH] [scudo][standalone] Use CheckAtomic to decide to link to 5 - libatomic 6 - 7 - Standalone scudo uses the atomic operation builtin functions, which require 8 - linking to libatomic on some platforms. Currently, this is done in an ad-hoc 9 - manner. MIPS platforms always link to libatomic, and the tests are always linked 10 - to it as well. libatomic is required on base ARMv6 (but not ARMv6K), but it is 11 - currently not linked, causing the build to fail. 12 - 13 - This patch replaces this ad-hoc logic with the CheckAtomic CMake module already 14 - used in other parts of LLVM. The CheckAtomic module checks whether std::atomic 15 - requires libatomic, which is not strictly the same as checking the atomic 16 - builtins, but should have the same results as far as I know. If this is 17 - problematic, a custom version of CheckAtomic could be used to specifically test 18 - the builtins. 19 - --- 20 - compiler-rt/lib/scudo/standalone/CMakeLists.txt | 7 +++++++ 21 - compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt | 4 +--- 22 - 2 files changed, 8 insertions(+), 3 deletions(-) 23 - 24 - diff --git a/lib/scudo/standalone/CMakeLists.txt b/lib/scudo/standalone/CMakeLists.txt 25 - index ae5c354768c8..eb27374ca520 100644 26 - --- a/lib/scudo/standalone/CMakeLists.txt 27 - +++ b/lib/scudo/standalone/CMakeLists.txt 28 - @@ -1,5 +1,8 @@ 29 - add_compiler_rt_component(scudo_standalone) 30 - 31 - +include(DetermineGCCCompatible) 32 - +include(CheckAtomic) 33 - + 34 - include_directories(../.. include) 35 - 36 - set(SCUDO_CFLAGS) 37 - @@ -34,6 +37,10 @@ list(APPEND SCUDO_LINK_FLAGS -Wl,-z,defs,-z,now,-z,relro) 38 - 39 - list(APPEND SCUDO_LINK_FLAGS -ffunction-sections -fdata-sections -Wl,--gc-sections) 40 - 41 - +if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB) 42 - + list(APPEND SCUDO_LINK_FLAGS -latomic) 43 - +endif() 44 - + 45 - # We don't use the C++ standard library, so avoid including it by mistake. 46 - append_list_if(COMPILER_RT_HAS_NOSTDLIBXX_FLAG -nostdlib++ SCUDO_LINK_FLAGS) 47 - 48 - diff --git a/lib/scudo/standalone/tests/CMakeLists.txt b/lib/scudo/standalone/tests/CMakeLists.txt 49 - index 6d0936cbb5c1..70a5a7e959c1 100644 50 - --- a/lib/scudo/standalone/tests/CMakeLists.txt 51 - +++ b/lib/scudo/standalone/tests/CMakeLists.txt 52 - @@ -38,9 +38,7 @@ set(LINK_FLAGS 53 - ${SANITIZER_TEST_CXX_LIBRARIES} 54 - ) 55 - list(APPEND LINK_FLAGS -pthread) 56 - -# Linking against libatomic is required with some compilers 57 - -check_library_exists(atomic __atomic_load_8 "" COMPILER_RT_HAS_LIBATOMIC) 58 - -if (COMPILER_RT_HAS_LIBATOMIC) 59 - +if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB) 60 - list(APPEND LINK_FLAGS -latomic) 61 - endif() 62 - 63 - -- 64 - 2.38.1 65 -
-42
pkgs/development/compilers/llvm/14/compiler-rt/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 3a41aa43e406..f000cee6eae0 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -5,6 +5,8 @@ 6 - 7 - cmake_minimum_required(VERSION 3.13.4) 8 - 9 - +include(GNUInstallDirs) 10 - + 11 - # Check if compiler-rt is built as a standalone project. 12 - if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) 13 - project(CompilerRT C CXX ASM) 14 - diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake 15 - index d7b0124f3546..3e111146df4d 100644 16 - --- a/cmake/base-config-ix.cmake 17 - +++ b/cmake/base-config-ix.cmake 18 - @@ -67,7 +67,7 @@ if (LLVM_TREE_AVAILABLE) 19 - else() 20 - # Take output dir and install path from the user. 21 - set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH 22 - - "Path where built compiler-rt libraries should be stored.") 23 - + "Path where built compiler-rt build artifacts should be stored.") 24 - set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH 25 - "Path where built compiler-rt executables should be stored.") 26 - set(COMPILER_RT_INSTALL_PATH "" CACHE PATH 27 - @@ -99,13 +99,13 @@ endif() 28 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 29 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 30 - ${COMPILER_RT_OUTPUT_DIR}/lib) 31 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib) 32 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}") 33 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 34 - "Path where built compiler-rt libraries should be installed.") 35 - else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 36 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 37 - ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) 38 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}") 39 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}") 40 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 41 - "Path where built compiler-rt libraries should be installed.") 42 - endif()
-21
pkgs/development/compilers/llvm/14/libunwind/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - --- a/CMakeLists.txt 3 - +++ b/CMakeLists.txt 4 - @@ -147,7 +147,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH 5 - 6 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 7 - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) 8 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH 9 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH 10 - "Path where built libunwind libraries should be installed.") 11 - if(LIBCXX_LIBDIR_SUBDIR) 12 - string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) 13 - @@ -159,7 +159,7 @@ else() 14 - else() 15 - set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) 16 - endif() 17 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH 18 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH 19 - "Path where built libunwind libraries should be installed.") 20 - endif() 21 -
-13
pkgs/development/compilers/llvm/14/lld/fix-root-src-dir.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 9bcc135665d0..d38679ed41e9 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -74,7 +74,7 @@ if(LLD_BUILT_STANDALONE) 6 - 7 - set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include") 8 - set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 9 - - set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 10 - + set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 11 - 12 - find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} 13 - NO_DEFAULT_PATH)
-22
pkgs/development/compilers/llvm/14/lld/gnu-install-dirs.patch
··· 1 - diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 2 - index dd2898ce6236..ebbea040ff54 100644 3 - --- a/cmake/modules/AddLLD.cmake 4 - +++ b/cmake/modules/AddLLD.cmake 5 - @@ -18,8 +18,8 @@ macro(add_lld_library name) 6 - install(TARGETS ${name} 7 - COMPONENT ${name} 8 - ${export_to_lldtargets} 9 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 10 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 11 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 12 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 13 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 14 - 15 - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) 16 - @@ -62,5 +62,5 @@ endmacro() 17 - macro(add_lld_symlink name dest) 18 - add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) 19 - # Always generate install targets 20 - - llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) 21 - + llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE) 22 - endmacro()
-19
pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs-polly.patch
··· 1 - This is the one remaining Polly install dirs related change that hasn't made it 2 - into upstream yet; previously this patch file also included: 3 - https://reviews.llvm.org/D117541 4 - 5 - diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake 6 - index 518a09b45a42..bd9d6f5542ad 100644 7 - --- a/tools/polly/cmake/polly_macros.cmake 8 - +++ b/tools/polly/cmake/polly_macros.cmake 9 - @@ -44,8 +44,8 @@ macro(add_polly_library name) 10 - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly") 11 - install(TARGETS ${name} 12 - EXPORT LLVMExports 13 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 14 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) 15 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} 16 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 17 - endif() 18 - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) 19 - endmacro(add_polly_library)
-220
pkgs/development/compilers/llvm/14/llvm/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index fec956091cd5..5a766f5c5d7c 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -303,6 +303,9 @@ set(LLVM_EXAMPLES_INSTALL_DIR "examples" CACHE STRING 6 - "Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON) (defaults to 'examples')") 7 - mark_as_advanced(LLVM_EXAMPLES_INSTALL_DIR) 8 - 9 - +set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING 10 - + "Path for CMake subdirectory (defaults to lib/cmake/llvm)" ) 11 - + 12 - # They are used as destination of target generators. 13 - set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) 14 - set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) 15 - diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 16 - index fed1fec7d72e..4baed19b9e98 100644 17 - --- a/cmake/modules/AddLLVM.cmake 18 - +++ b/cmake/modules/AddLLVM.cmake 19 - @@ -838,8 +838,8 @@ macro(add_llvm_library name) 20 - get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) 21 - install(TARGETS ${name} 22 - ${export_to_llvmexports} 23 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 24 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 25 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 26 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 27 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) 28 - 29 - if (NOT LLVM_ENABLE_IDE) 30 - @@ -1056,7 +1056,7 @@ function(process_llvm_pass_plugins) 31 - "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})") 32 - install(FILES 33 - ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake 34 - - DESTINATION ${LLVM_INSTALL_PACKAGE_DIR} 35 - + DESTINATION ${LLVM_INSTALL_CMAKE_DIR} 36 - COMPONENT cmake-exports) 37 - 38 - set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def") 39 - @@ -1902,7 +1902,7 @@ function(llvm_install_library_symlink name dest type) 40 - set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) 41 - set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX}) 42 - 43 - - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) 44 - + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 45 - if(WIN32 AND "${type}" STREQUAL "SHARED") 46 - set(output_dir bin) 47 - endif() 48 - @@ -1913,7 +1913,7 @@ function(llvm_install_library_symlink name dest type) 49 - 50 - endfunction() 51 - 52 - -function(llvm_install_symlink name dest) 53 - +function(llvm_install_symlink name dest output_dir) 54 - cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN}) 55 - foreach(path ${CMAKE_MODULE_PATH}) 56 - if(EXISTS ${path}/LLVMInstallSymlink.cmake) 57 - @@ -1936,7 +1936,7 @@ function(llvm_install_symlink name dest) 58 - set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX}) 59 - 60 - install(SCRIPT ${INSTALL_SYMLINK} 61 - - CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})" 62 - + CODE "install_symlink(${full_name} ${full_dest} ${output_dir})" 63 - COMPONENT ${component}) 64 - 65 - if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE) 66 - @@ -2019,7 +2019,8 @@ function(add_llvm_tool_symlink link_name target) 67 - endif() 68 - 69 - if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS) 70 - - llvm_install_symlink(${link_name} ${target}) 71 - + GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR) 72 - + llvm_install_symlink(${link_name} ${target} ${output_dir}) 73 - endif() 74 - endif() 75 - endfunction() 76 - @@ -2148,9 +2149,9 @@ function(llvm_setup_rpath name) 77 - # Since BUILD_SHARED_LIBS is only recommended for use by developers, 78 - # hardcode the rpath to build/install lib dir first in this mode. 79 - # FIXME: update this when there is better solution. 80 - - set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 81 - + set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 82 - elseif(UNIX) 83 - - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 84 - + set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 85 - if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 86 - set_property(TARGET ${name} APPEND_STRING PROPERTY 87 - LINK_FLAGS " -Wl,-z,origin ") 88 - diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake 89 - index 891c9e6d618c..8d963f3b0069 100644 90 - --- a/cmake/modules/AddOCaml.cmake 91 - +++ b/cmake/modules/AddOCaml.cmake 92 - @@ -147,9 +147,9 @@ function(add_ocaml_library name) 93 - endforeach() 94 - 95 - if( APPLE ) 96 - - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 97 - + set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 98 - elseif( UNIX ) 99 - - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 100 - + set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 101 - endif() 102 - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 103 - 104 - diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 105 - index cea0c1df0a14..eedcd9450312 100644 106 - --- a/cmake/modules/CMakeLists.txt 107 - +++ b/cmake/modules/CMakeLists.txt 108 - @@ -2,7 +2,7 @@ include(ExtendPath) 109 - include(LLVMDistributionSupport) 110 - include(FindPrefixFromConfig) 111 - 112 - -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) 113 - +set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')") 114 - set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") 115 - 116 - # First for users who use an installed LLVM, create the LLVMExports.cmake file. 117 - @@ -122,7 +122,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS 118 - ) 119 - list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS) 120 - 121 - -extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}") 122 - +extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") 123 - set(LLVM_CONFIG_LIBRARY_DIRS 124 - "${LLVM_CONFIG_LIBRARY_DIR}" 125 - # FIXME: Should there be other entries here? 126 - diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake 127 - index b5c35f706cb7..9261ab797de6 100644 128 - --- a/cmake/modules/LLVMInstallSymlink.cmake 129 - +++ b/cmake/modules/LLVMInstallSymlink.cmake 130 - @@ -6,7 +6,7 @@ include(GNUInstallDirs) 131 - 132 - function(install_symlink name target outdir) 133 - set(DESTDIR $ENV{DESTDIR}) 134 - - set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}") 135 - + set(bindir "${DESTDIR}${outdir}/") 136 - 137 - message(STATUS "Creating ${name}") 138 - 139 - diff --git a/docs/CMake.rst b/docs/CMake.rst 140 - index 044ec8a4d39d..504d0eac3ade 100644 141 - --- a/docs/CMake.rst 142 - +++ b/docs/CMake.rst 143 - @@ -224,7 +224,7 @@ description is in `LLVM-related variables`_ below. 144 - **LLVM_LIBDIR_SUFFIX**:STRING 145 - Extra suffix to append to the directory where libraries are to be 146 - installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` 147 - - to install libraries to ``/usr/lib64``. 148 - + to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``. 149 - 150 - **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING 151 - Building the llvm toolchain can use a lot of resources, particularly 152 - @@ -910,9 +910,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``). 153 - 154 - This file is available in two different locations. 155 - 156 - -* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where 157 - - ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM. 158 - - On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. 159 - +* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where 160 - + ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are 161 - + installed as part of an installed version of LLVM. This is typically 162 - + ``cmake/llvm/`` within the lib directory. On Linux, this is typically 163 - + ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. 164 - 165 - * ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where 166 - ``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only 167 - diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt 168 - index b46319f24fc8..2feabd1954e4 100644 169 - --- a/include/llvm/CMakeLists.txt 170 - +++ b/include/llvm/CMakeLists.txt 171 - @@ -5,5 +5,5 @@ add_subdirectory(Frontend) 172 - # If we're doing an out-of-tree build, copy a module map for generated 173 - # header files into the build area. 174 - if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 175 - - configure_file(module.modulemap.build module.modulemap COPYONLY) 176 - + configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY) 177 - endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") 178 - diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 179 - index abbb8a450da6..70c497be12f5 100644 180 - --- a/tools/llvm-config/BuildVariables.inc.in 181 - +++ b/tools/llvm-config/BuildVariables.inc.in 182 - @@ -23,7 +23,10 @@ 183 - #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" 184 - #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" 185 - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" 186 - +#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@" 187 - +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" 188 - #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" 189 - +#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@" 190 - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" 191 - #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@" 192 - #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@" 193 - diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 194 - index 8ed88f33ead4..5e7184bab90d 100644 195 - --- a/tools/llvm-config/llvm-config.cpp 196 - +++ b/tools/llvm-config/llvm-config.cpp 197 - @@ -363,12 +363,20 @@ int main(int argc, char **argv) { 198 - ActiveIncludeDir = std::string(Path.str()); 199 - } 200 - { 201 - - SmallString<256> Path(LLVM_TOOLS_INSTALL_DIR); 202 - + SmallString<256> Path(LLVM_INSTALL_BINDIR); 203 - sys::fs::make_absolute(ActivePrefix, Path); 204 - ActiveBinDir = std::string(Path.str()); 205 - } 206 - - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; 207 - - ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; 208 - + { 209 - + SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX); 210 - + sys::fs::make_absolute(ActivePrefix, Path); 211 - + ActiveLibDir = std::string(Path.str()); 212 - + } 213 - + { 214 - + SmallString<256> Path(LLVM_INSTALL_CMAKEDIR); 215 - + sys::fs::make_absolute(ActivePrefix, Path); 216 - + ActiveCMakeDir = std::string(Path.str()); 217 - + } 218 - ActiveIncludeOption = "-I" + ActiveIncludeDir; 219 - } 220 -
-45
pkgs/development/compilers/llvm/14/openmp/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - --- a/CMakeLists.txt 3 - +++ b/CMakeLists.txt 4 - @@ -24,7 +24,7 @@ if (OPENMP_STANDALONE_BUILD) 5 - set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING 6 - "Suffix of lib installation directory, e.g. 64 => lib64") 7 - # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. 8 - - set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}") 9 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}") 10 - 11 - # Group test settings. 12 - set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING 13 - @@ -35,7 +35,7 @@ if (OPENMP_STANDALONE_BUILD) 14 - else() 15 - set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) 16 - # If building in tree, we honor the same install suffix LLVM uses. 17 - - set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}") 18 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 19 - 20 - if (NOT MSVC) 21 - set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) 22 - diff --git a/libomptarget/plugins/amdgpu/CMakeLists.txt b/libomptarget/plugins/amdgpu/CMakeLists.txt 23 - --- a/libomptarget/plugins/amdgpu/CMakeLists.txt 24 - +++ b/libomptarget/plugins/amdgpu/CMakeLists.txt 25 - @@ -74,7 +74,7 @@ add_library(omptarget.rtl.amdgpu SHARED 26 - 27 - # Install plugin under the lib destination folder. 28 - # When we build for debug, OPENMP_LIBDIR_SUFFIX get set to -debug 29 - -install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "lib${OPENMP_LIBDIR_SUFFIX}") 30 - +install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}") 31 - set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON) 32 - 33 - if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") 34 - diff --git a/libomptarget/plugins/ve/CMakeLists.txt b/libomptarget/plugins/ve/CMakeLists.txt 35 - --- a/libomptarget/plugins/ve/CMakeLists.txt 36 - +++ b/libomptarget/plugins/ve/CMakeLists.txt 37 - @@ -32,7 +32,7 @@ if(${LIBOMPTARGET_DEP_VEO_FOUND}) 38 - 39 - # Install plugin under the lib destination folder. 40 - install(TARGETS "omptarget.rtl.${tmachine_libname}" 41 - - LIBRARY DESTINATION lib${OPENMP_LIBDIR_SUFFIX}) 42 - + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}) 43 - 44 - target_link_libraries( 45 - "omptarget.rtl.${tmachine_libname}"
-12
pkgs/development/compilers/llvm/14/openmp/run-lit-directly.patch
··· 1 - diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake 2 - --- a/cmake/OpenMPTesting.cmake 3 - +++ b/cmake/OpenMPTesting.cmake 4 - @@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment) 5 - if (${OPENMP_STANDALONE_BUILD}) 6 - set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS}) 7 - add_custom_target(${target} 8 - - COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS} 9 - + COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS} 10 - COMMENT ${comment} 11 - DEPENDS ${ARG_DEPENDS} 12 - USES_TERMINAL
-105
pkgs/development/compilers/llvm/15/clang/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index c27beec313d7..480f13e73c9f 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -78,15 +78,17 @@ if(CLANG_BUILT_STANDALONE) 6 - if (NOT LLVM_CONFIG_FOUND) 7 - # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 8 - # path is removed. 9 - - set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}") 10 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 11 - set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 12 - # N.B. this is just a default value, the CACHE PATHs below can be overriden. 13 - set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 14 - set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}") 15 - set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}") 16 - + else() 17 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 18 - endif() 19 - 20 - - set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include") 21 - + set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 22 - set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 23 - set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 24 - set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin") 25 - @@ -128,7 +130,7 @@ if(CLANG_BUILT_STANDALONE) 26 - set(LLVM_INCLUDE_TESTS ON) 27 - endif() 28 - 29 - - include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") 30 - + include_directories(${LLVM_INCLUDE_DIRS}) 31 - link_directories("${LLVM_LIBRARY_DIR}") 32 - 33 - set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) 34 - diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 35 - index 21ac332e4f5f..b16c314bd1e2 100644 36 - --- a/cmake/modules/AddClang.cmake 37 - +++ b/cmake/modules/AddClang.cmake 38 - @@ -119,8 +119,8 @@ macro(add_clang_library name) 39 - install(TARGETS ${lib} 40 - COMPONENT ${lib} 41 - ${export_to_clangtargets} 42 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 43 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 44 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 45 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 46 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 47 - 48 - if (NOT LLVM_ENABLE_IDE) 49 - diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt 50 - index 6e2060991b92..b9bc930d26b8 100644 51 - --- a/lib/Headers/CMakeLists.txt 52 - +++ b/lib/Headers/CMakeLists.txt 53 - @@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files}) 54 - add_header_target("windows-resource-headers" ${windows_only_files}) 55 - add_header_target("utility-resource-headers" ${utility_files}) 56 - 57 - -set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 58 - +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) 59 - 60 - ############################################################# 61 - # Install rules for the catch-all clang-resource-headers target 62 - diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt 63 - index 8d95d0900e8c..ebc70ff7526d 100644 64 - --- a/tools/libclang/CMakeLists.txt 65 - +++ b/tools/libclang/CMakeLists.txt 66 - @@ -180,7 +180,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) 67 - COMPONENT 68 - libclang-python-bindings 69 - DESTINATION 70 - - "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 71 - + "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 72 - endforeach() 73 - if(NOT LLVM_ENABLE_IDE) 74 - add_custom_target(libclang-python-bindings) 75 - diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt 76 - index 061dc7ef4dd9..adc54b2edc32 100644 77 - --- a/tools/scan-build-py/CMakeLists.txt 78 - +++ b/tools/scan-build-py/CMakeLists.txt 79 - @@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild}) 80 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib}) 81 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib}) 82 - install(PROGRAMS lib/libscanbuild/${lib} 83 - - DESTINATION lib/libscanbuild 84 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild" 85 - COMPONENT scan-build-py) 86 - endforeach() 87 - 88 - @@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources}) 89 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource}) 90 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource}) 91 - install(PROGRAMS lib/libscanbuild/resources/${resource} 92 - - DESTINATION lib/libscanbuild/resources 93 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources" 94 - COMPONENT scan-build-py) 95 - endforeach() 96 - 97 - @@ -122,7 +122,7 @@ foreach(lib ${LibEar}) 98 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib}) 99 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib}) 100 - install(PROGRAMS lib/libear/${lib} 101 - - DESTINATION lib/libear 102 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear" 103 - COMPONENT scan-build-py) 104 - endforeach() 105 -
-29
pkgs/development/compilers/llvm/15/clang/purity.patch
··· 1 - From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001 2 - From: Will Dietz <w@wdtz.org> 3 - Date: Thu, 18 May 2017 11:56:12 -0500 4 - Subject: [PATCH] "purity" patch for 5.0 5 - 6 - --- 7 - lib/Driver/ToolChains/Gnu.cpp | 7 ------- 8 - 1 file changed, 7 deletions(-) 9 - 10 - diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp 11 - index fe3c0191bb..c6a482bece 100644 12 - --- a/lib/Driver/ToolChains/Gnu.cpp 13 - +++ b/lib/Driver/ToolChains/Gnu.cpp 14 - @@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 15 - } else { 16 - if (Args.hasArg(options::OPT_rdynamic)) 17 - CmdArgs.push_back("-export-dynamic"); 18 - 19 - - if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE && 20 - - !Args.hasArg(options::OPT_r)) { 21 - - CmdArgs.push_back("-dynamic-linker"); 22 - - CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + 23 - - ToolChain.getDynamicLinker(Args))); 24 - - } 25 - } 26 - 27 - CmdArgs.push_back("-o"); 28 - -- 29 - 2.11.0
pkgs/development/compilers/llvm/15/compiler-rt/X86-support-extension.patch pkgs/development/compilers/llvm/18/compiler-rt/X86-support-extension.patch
pkgs/development/compilers/llvm/15/compiler-rt/armv6-scudo-libatomic.patch pkgs/development/compilers/llvm/18/compiler-rt/armv6-scudo-libatomic.patch
-20
pkgs/development/compilers/llvm/15/compiler-rt/gnu-install-dirs.patch
··· 1 - diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake 2 - index 8a6219568b3f..30ee68a47ccf 100644 3 - --- a/cmake/base-config-ix.cmake 4 - +++ b/cmake/base-config-ix.cmake 5 - @@ -100,13 +100,13 @@ endif() 6 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 7 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 8 - ${COMPILER_RT_OUTPUT_DIR}/lib) 9 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib) 10 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}") 11 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 12 - "Path where built compiler-rt libraries should be installed.") 13 - else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 14 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 15 - ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) 16 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}") 17 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}") 18 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 19 - "Path where built compiler-rt libraries should be installed.") 20 - endif()
-22
pkgs/development/compilers/llvm/15/libunwind/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 5a06805f05f1..86a50329e6a8 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH 6 - 7 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 8 - set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) 9 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH 10 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH 11 - "Path where built libunwind libraries should be installed.") 12 - if(LIBCXX_LIBDIR_SUBDIR) 13 - string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) 14 - @@ -129,7 +129,7 @@ else() 15 - else() 16 - set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) 17 - endif() 18 - - set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH 19 - + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH 20 - "Path where built libunwind libraries should be installed.") 21 - endif() 22 -
-46
pkgs/development/compilers/llvm/15/lld/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index dcc649629a4b..58dca54642e4 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -70,13 +70,15 @@ if(LLD_BUILT_STANDALONE) 6 - if (NOT LLVM_CONFIG_FOUND) 7 - # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 8 - # path is removed. 9 - - set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}") 10 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 11 - set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 12 - # N.B. this is just a default value, the CACHE PATHs below can be overridden. 13 - set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 14 - + else() 15 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 16 - endif() 17 - 18 - - set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include") 19 - + set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 20 - set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 21 - set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 22 - 23 - @@ -95,7 +97,7 @@ if(LLD_BUILT_STANDALONE) 24 - 25 - set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") 26 - 27 - - include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS}) 28 - + include_directories(${LLVM_INCLUDE_DIRS}) 29 - link_directories(${LLVM_LIBRARY_DIRS}) 30 - 31 - if(LLVM_INCLUDE_TESTS) 32 - diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 33 - index d3924f7243d4..42a7cd62281c 100644 34 - --- a/cmake/modules/AddLLD.cmake 35 - +++ b/cmake/modules/AddLLD.cmake 36 - @@ -18,8 +18,8 @@ macro(add_lld_library name) 37 - install(TARGETS ${name} 38 - COMPONENT ${name} 39 - ${export_to_lldtargets} 40 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 41 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 42 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 43 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 44 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 45 - 46 - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
-46
pkgs/development/compilers/llvm/15/lldb/procfs.patch
··· 1 - --- a/source/Plugins/Process/Linux/Procfs.h 2 - +++ b/source/Plugins/Process/Linux/Procfs.h 3 - @@ -10,6 +10,13 @@ 4 - // sys/procfs.h on Android/Linux for all supported architectures. 5 - 6 - #include <sys/ptrace.h> 7 - +#include <asm/ptrace.h> 8 - + 9 - +// on i686 preprocessor symbols with these register names are defined as 10 - +// numeric constants; these symbols clash with identifier names used in 11 - +// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12 - +#undef FS 13 - +#undef CS 14 - 15 - #include "lldb/lldb-types.h" 16 - 17 - @@ -17,23 +24,13 @@ 18 - 19 - #include <vector> 20 - 21 - -#ifdef __ANDROID__ 22 - -#if defined(__arm64__) || defined(__aarch64__) 23 - -typedef unsigned long elf_greg_t; 24 - -typedef elf_greg_t 25 - - elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26 - -typedef struct user_fpsimd_state elf_fpregset_t; 27 - -#ifndef NT_FPREGSET 28 - -#define NT_FPREGSET NT_PRFPREG 29 - -#endif // NT_FPREGSET 30 - -#elif defined(__mips__) 31 - -#ifndef NT_FPREGSET 32 - -#define NT_FPREGSET NT_PRFPREG 33 - -#endif // NT_FPREGSET 34 - -#endif 35 - -#else // __ANDROID__ 36 - +#if !defined(__GLIBC__) && defined(__powerpc__) 37 - +#define pt_regs musl_pt_regs 38 - +#include <sys/procfs.h> 39 - +#undef pt_regs 40 - +#else 41 - #include <sys/procfs.h> 42 - -#endif // __ANDROID__ 43 - +#endif 44 - 45 - namespace lldb_private { 46 - namespace process_linux {
-138
pkgs/development/compilers/llvm/15/llvm/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 45399dc0537e..5d946e9e6583 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -942,7 +942,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") 6 - add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src 7 - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) 8 - install(TARGETS tf_xla_runtime EXPORT LLVMExports 9 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) 10 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) 11 - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime) 12 - # Once we add more modules, we should handle this more automatically. 13 - if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL) 14 - diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 15 - index 057431208322..56f0dcb258da 100644 16 - --- a/cmake/modules/AddLLVM.cmake 17 - +++ b/cmake/modules/AddLLVM.cmake 18 - @@ -844,8 +844,8 @@ macro(add_llvm_library name) 19 - get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) 20 - install(TARGETS ${name} 21 - ${export_to_llvmexports} 22 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 23 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 24 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 25 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 26 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) 27 - 28 - if (NOT LLVM_ENABLE_IDE) 29 - @@ -2007,7 +2007,7 @@ function(llvm_install_library_symlink name dest type) 30 - set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) 31 - set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX}) 32 - 33 - - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) 34 - + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 35 - if(WIN32 AND "${type}" STREQUAL "SHARED") 36 - set(output_dir "${CMAKE_INSTALL_BINDIR}") 37 - endif() 38 - @@ -2271,15 +2271,15 @@ function(llvm_setup_rpath name) 39 - 40 - if (APPLE) 41 - set(_install_name_dir INSTALL_NAME_DIR "@rpath") 42 - - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 43 - + set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 44 - elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS) 45 - # $ORIGIN is not interpreted at link time by aix ld. 46 - # Since BUILD_SHARED_LIBS is only recommended for use by developers, 47 - # hardcode the rpath to build/install lib dir first in this mode. 48 - # FIXME: update this when there is better solution. 49 - - set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 50 - + set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 51 - elseif(UNIX) 52 - - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 53 - + set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 54 - if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 55 - set_property(TARGET ${name} APPEND_STRING PROPERTY 56 - LINK_FLAGS " -Wl,-z,origin ") 57 - diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake 58 - index 891c9e6d618c..8d963f3b0069 100644 59 - --- a/cmake/modules/AddOCaml.cmake 60 - +++ b/cmake/modules/AddOCaml.cmake 61 - @@ -147,9 +147,9 @@ function(add_ocaml_library name) 62 - endforeach() 63 - 64 - if( APPLE ) 65 - - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 66 - + set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 67 - elseif( UNIX ) 68 - - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 69 - + set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 70 - endif() 71 - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 72 - 73 - diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 74 - index d4b0ab959148..26ed981fd09f 100644 75 - --- a/cmake/modules/CMakeLists.txt 76 - +++ b/cmake/modules/CMakeLists.txt 77 - @@ -128,7 +128,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS 78 - ) 79 - list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS) 80 - 81 - -extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}") 82 - +extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") 83 - set(LLVM_CONFIG_LIBRARY_DIRS 84 - "${LLVM_CONFIG_LIBRARY_DIR}" 85 - # FIXME: Should there be other entries here? 86 - diff --git a/docs/CMake.rst b/docs/CMake.rst 87 - index 879b7b231d4c..9c31d14e8950 100644 88 - --- a/docs/CMake.rst 89 - +++ b/docs/CMake.rst 90 - @@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below. 91 - **LLVM_LIBDIR_SUFFIX**:STRING 92 - Extra suffix to append to the directory where libraries are to be 93 - installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` 94 - - to install libraries to ``/usr/lib64``. 95 - + to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``. 96 - 97 - **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING 98 - Building the llvm toolchain can use a lot of resources, particularly 99 - @@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``. 100 - The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*. 101 - Defaults to "bin". 102 - 103 - +**CMAKE_INSTALL_LIBDIR**:PATH 104 - + The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*. 105 - + Defaults to "lib". 106 - + 107 - **CMAKE_INSTALL_INCLUDEDIR**:PATH 108 - The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*. 109 - Defaults to "include". 110 - diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 111 - index 370005cd8d7d..7e790bc52111 100644 112 - --- a/tools/llvm-config/BuildVariables.inc.in 113 - +++ b/tools/llvm-config/BuildVariables.inc.in 114 - @@ -23,6 +23,7 @@ 115 - #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" 116 - #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" 117 - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" 118 - +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" 119 - #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" 120 - #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@" 121 - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" 122 - diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 123 - index 2c6c55f89d38..f6d2068a0827 100644 124 - --- a/tools/llvm-config/llvm-config.cpp 125 - +++ b/tools/llvm-config/llvm-config.cpp 126 - @@ -369,7 +369,11 @@ int main(int argc, char **argv) { 127 - sys::fs::make_absolute(ActivePrefix, Path); 128 - ActiveBinDir = std::string(Path.str()); 129 - } 130 - - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; 131 - + { 132 - + SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX); 133 - + sys::fs::make_absolute(ActivePrefix, Path); 134 - + ActiveLibDir = std::string(Path.str()); 135 - + } 136 - { 137 - SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR); 138 - sys::fs::make_absolute(ActivePrefix, Path);
-26
pkgs/development/compilers/llvm/15/llvm/lit-shell-script-runner-set-dyld-library-path.patch
··· 1 - diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py 2 - index 0242e0b75af3..d732011306f7 100644 3 - --- a/utils/lit/lit/TestRunner.py 4 - +++ b/utils/lit/lit/TestRunner.py 5 - @@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd): 6 - f.write('@echo off\n') 7 - f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands)) 8 - else: 9 - + # This env var is *purged* when invoking subprocesses so we have to 10 - + # manually set it from within the bash script in order for the commands 11 - + # in run lines to see this var: 12 - + if "DYLD_LIBRARY_PATH" in test.config.environment: 13 - + f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n') 14 - + 15 - for i, ln in enumerate(commands): 16 - match = re.match(kPdbgRegex, ln) 17 - if match: 18 - @@ -1363,7 +1369,7 @@ def applySubstitutions(script, substitutions, conditions={}, 19 - return processed 20 - 21 - process = processLine if recursion_limit is None else processLineToFixedPoint 22 - - 23 - + 24 - return [unescapePercents(process(ln)) for ln in script] 25 - 26 -
-79
pkgs/development/compilers/llvm/15/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
··· 1 - diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py 2 - index 81e8dc04acea..479ff95681e2 100644 3 - --- a/test/Unit/lit.cfg.py 4 - +++ b/test/Unit/lit.cfg.py 5 - @@ -3,6 +3,7 @@ 6 - # Configuration file for the 'lit' test runner. 7 - 8 - import os 9 - +import platform 10 - import subprocess 11 - 12 - import lit.formats 13 - @@ -55,3 +56,26 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): 14 - # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate. 15 - if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ: 16 - config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE'] 17 - + 18 - +# Add the LLVM dynamic libs to the platform-specific loader search path env var: 19 - +# 20 - +# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify.. 21 - +def find_shlibpath_var(): 22 - + if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']: 23 - + yield 'LD_LIBRARY_PATH' 24 - + elif platform.system() == 'Darwin': 25 - + yield 'DYLD_LIBRARY_PATH' 26 - + elif platform.system() == 'Windows': 27 - + yield 'PATH' 28 - + elif platform.system() == 'AIX': 29 - + yield 'LIBPATH' 30 - + 31 - +for shlibpath_var in find_shlibpath_var(): 32 - + shlibpath = os.path.pathsep.join( 33 - + (config.shlibdir, 34 - + config.environment.get(shlibpath_var, ''))) 35 - + config.environment[shlibpath_var] = shlibpath 36 - + break 37 - +else: 38 - + lit_config.warning("unable to inject shared library path on '{}'" 39 - + .format(platform.system())) 40 - diff --git a/test/lit.cfg.py b/test/lit.cfg.py 41 - index 75a38b4c5dad..856fc75c9d74 100644 42 - --- a/test/lit.cfg.py 43 - +++ b/test/lit.cfg.py 44 - @@ -42,6 +42,26 @@ llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True) 45 - llvm_config.with_system_environment( 46 - ['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP']) 47 - 48 - +# Add the LLVM dynamic libs to the platform-specific loader search path env var: 49 - +# 50 - +# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify.. 51 - +def find_shlibpath_var(): 52 - + if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']: 53 - + yield 'LD_LIBRARY_PATH' 54 - + elif platform.system() == 'Darwin': 55 - + yield 'DYLD_LIBRARY_PATH' 56 - + elif platform.system() == 'Windows': 57 - + yield 'PATH' 58 - + elif platform.system() == 'AIX': 59 - + yield 'LIBPATH' 60 - + 61 - +for shlibpath_var in find_shlibpath_var(): 62 - + shlibpath = config.llvm_shlib_dir 63 - + llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True) 64 - + break 65 - +else: 66 - + lit_config.warning("unable to inject shared library path on '{}'" 67 - + .format(platform.system())) 68 - 69 - # Set up OCAMLPATH to include newly built OCaml libraries. 70 - top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml') 71 - @@ -318,7 +338,7 @@ def have_cxx_shared_library(): 72 - 73 - try: 74 - readobj_cmd = subprocess.Popen( 75 - - [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE) 76 - + [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE, env=config.environment) 77 - except OSError: 78 - print('could not exec llvm-readobj') 79 - return False
pkgs/development/compilers/llvm/15/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch pkgs/development/compilers/llvm/18/llvm/polly-lit-cfg-add-libs-to-dylib-path.patch
-18
pkgs/development/compilers/llvm/15/openmp/fix-find-tool.patch
··· 1 - diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt 2 - index ce66214822a2..6ab7b33c95da 100644 3 - --- a/libomptarget/DeviceRTL/CMakeLists.txt 4 - +++ b/libomptarget/DeviceRTL/CMakeLists.txt 5 - @@ -27,10 +27,10 @@ endif() 6 - if (LLVM_DIR) 7 - # Builds that use pre-installed LLVM have LLVM_DIR set. 8 - # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route 9 - - find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 10 - + find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR}) 11 - find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} 12 - - NO_DEFAULT_PATH) 13 - - find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 14 - + ) 15 - + find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR}) 16 - if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL)) 17 - libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}") 18 - return()
-22
pkgs/development/compilers/llvm/15/openmp/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b6ddbe90516d..311ab1d50e7f 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD) 6 - set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING 7 - "Suffix of lib installation directory, e.g. 64 => lib64") 8 - # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. 9 - - set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}") 10 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}") 11 - 12 - # Group test settings. 13 - set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING 14 - @@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD) 15 - else() 16 - set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) 17 - # If building in tree, we honor the same install suffix LLVM uses. 18 - - set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}") 19 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 20 - 21 - if (NOT MSVC) 22 - set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
-109
pkgs/development/compilers/llvm/16/clang/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 090cfa352078..624b7c9f3400 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -38,12 +38,26 @@ if(CLANG_BUILT_STANDALONE) 6 - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") 7 - list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") 8 - 9 - - # Turn into CACHE PATHs for overwritting 10 - - set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 11 - - set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree") 12 - - set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 13 - - set(LLVM_TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin") 14 - - set(LLVM_LIBRARY_DIR "${LLVM_LIBRARY_DIR}" CACHE PATH "Path to llvm/lib") 15 - + # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets 16 - + # LLVM_CONFIG. 17 - + if (NOT LLVM_CONFIG_FOUND) 18 - + # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 19 - + # path is removed. 20 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 21 - + set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 22 - + # N.B. this is just a default value, the CACHE PATHs below can be overriden. 23 - + set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 24 - + set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}") 25 - + set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}") 26 - + else() 27 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 28 - + endif() 29 - + 30 - + set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 31 - + set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 32 - + set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 33 - + set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin") 34 - + set(LLVM_LIBRARY_DIR "${LIBRARY_DIR}" CACHE PATH "Path to llvm/lib") 35 - 36 - find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} 37 - NO_DEFAULT_PATH) 38 - diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 39 - index 75b0080f6715..c895b884cd27 100644 40 - --- a/cmake/modules/AddClang.cmake 41 - +++ b/cmake/modules/AddClang.cmake 42 - @@ -119,8 +119,8 @@ macro(add_clang_library name) 43 - install(TARGETS ${lib} 44 - COMPONENT ${lib} 45 - ${export_to_clangtargets} 46 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 47 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 48 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 49 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 50 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 51 - 52 - if (NOT LLVM_ENABLE_IDE) 53 - diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt 54 - index bb9a11eabbef..e2de91c65fbb 100644 55 - --- a/lib/Headers/CMakeLists.txt 56 - +++ b/lib/Headers/CMakeLists.txt 57 - @@ -437,7 +437,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files}) 58 - add_header_target("windows-resource-headers" ${windows_only_files}) 59 - add_header_target("utility-resource-headers" ${utility_files}) 60 - 61 - -set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include) 62 - +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include) 63 - 64 - ############################################################# 65 - # Install rules for the catch-all clang-resource-headers target 66 - diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt 67 - index 4f23065a2472..6a0f55991e24 100644 68 - --- a/tools/libclang/CMakeLists.txt 69 - +++ b/tools/libclang/CMakeLists.txt 70 - @@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) 71 - COMPONENT 72 - libclang-python-bindings 73 - DESTINATION 74 - - "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 75 - + "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 76 - endforeach() 77 - if(NOT LLVM_ENABLE_IDE) 78 - add_custom_target(libclang-python-bindings) 79 - diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt 80 - index 3aca22c0b0a8..3115353e3fe3 100644 81 - --- a/tools/scan-build-py/CMakeLists.txt 82 - +++ b/tools/scan-build-py/CMakeLists.txt 83 - @@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild}) 84 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib}) 85 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib}) 86 - install(FILES lib/libscanbuild/${lib} 87 - - DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild 88 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild" 89 - COMPONENT scan-build-py) 90 - endforeach() 91 - 92 - @@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources}) 93 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource}) 94 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource}) 95 - install(FILES lib/libscanbuild/resources/${resource} 96 - - DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources 97 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources" 98 - COMPONENT scan-build-py) 99 - endforeach() 100 - 101 - @@ -122,7 +122,7 @@ foreach(lib ${LibEar}) 102 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib}) 103 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib}) 104 - install(FILES lib/libear/${lib} 105 - - DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear 106 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear" 107 - COMPONENT scan-build-py) 108 - endforeach() 109 -
-11
pkgs/development/compilers/llvm/16/compiler-rt/asan-offset.patch
··· 1 - --- a/lib/asan/CMakeLists.txt 2022-06-22 16:46:24.000000000 +0000 2 - +++ b/lib/asan/CMakeLists.txt 3 - @@ -46,7 +46,7 @@ set(ASAN_STATIC_SOURCES 4 - asan_rtl_static.cpp 5 - ) 6 - 7 - -if (NOT WIN32 AND NOT APPLE) 8 - +if (LINUX) 9 - list(APPEND ASAN_STATIC_SOURCES 10 - asan_rtl_x86_64.S 11 - )
-21
pkgs/development/compilers/llvm/16/compiler-rt/freebsd-i386.patch
··· 1 - --- a/lib/builtins/fp_lib.h 1969-12-31 16:00:01.000000000 -0800 2 - +++ b/lib/builtins/fp_lib.h 2023-12-21 23:39:36.066927293 -0800 3 - @@ -26,18 +26,6 @@ 4 - #include <stdbool.h> 5 - #include <stdint.h> 6 - 7 - -// x86_64 FreeBSD prior v9.3 define fixed-width types incorrectly in 8 - -// 32-bit mode. 9 - -#if defined(__FreeBSD__) && defined(__i386__) 10 - -#include <sys/param.h> 11 - -#if __FreeBSD_version < 903000 // v9.3 12 - -#define uint64_t unsigned long long 13 - -#define int64_t long long 14 - -#undef UINT64_C 15 - -#define UINT64_C(c) (c##ULL) 16 - -#endif 17 - -#endif 18 - - 19 - #if defined SINGLE_PRECISION 20 - 21 - typedef uint16_t half_rep_t;
pkgs/development/compilers/llvm/16/compiler-rt/normalize-var.patch pkgs/development/compilers/llvm/18/compiler-rt/normalize-var.patch
pkgs/development/compilers/llvm/16/libclc/gnu-install-dirs.patch pkgs/development/compilers/llvm/18/libclc/gnu-install-dirs.patch
-190
pkgs/development/compilers/llvm/16/lld/add-table-base.patch
··· 1 - From 93adcb770b99351b18553089c164fe3ef2119699 Mon Sep 17 00:00:00 2001 2 - From: Sam Clegg <sbc@chromium.org> 3 - Date: Fri, 25 Aug 2023 13:56:16 -0700 4 - Subject: [PATCH] [lld][WebAssembly] Add `--table-base` setting 5 - 6 - This is similar to `--global-base` but determines where to place the 7 - table segments rather than that data segments. 8 - 9 - See https://github.com/emscripten-core/emscripten/issues/20097 10 - 11 - Differential Revision: https://reviews.llvm.org/D158892 12 - --- 13 - test/wasm/table-base.s | 72 ++++++++++++++++++++++++++++++++++++++ 14 - wasm/Driver.cpp | 19 ++++++++-- 15 - wasm/Options.td | 5 ++- 16 - wasm/Writer.cpp | 8 ----- 17 - 4 files changed, 93 insertions(+), 11 deletions(-) 18 - create mode 100644 test/wasm/table-base.s 19 - 20 - diff --git a/test/wasm/table-base.s b/test/wasm/table-base.s 21 - new file mode 100644 22 - index 000000000000000..56fff414fd31d96 23 - --- /dev/null 24 - +++ b/test/wasm/table-base.s 25 - @@ -0,0 +1,72 @@ 26 - +# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o 27 - + 28 - +# RUN: wasm-ld --export=__table_base -o %t.wasm %t.o 29 - +# RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=CHECK-DEFAULT 30 - + 31 - +# RUN: wasm-ld --table-base=100 --export=__table_base -o %t.wasm %t.o 32 - +# RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=CHECK-100 33 - + 34 - +.globl _start 35 - +_start: 36 - + .functype _start () -> () 37 - + i32.const _start 38 - + drop 39 - + end_function 40 - + 41 - +# CHECK-DEFAULT: - Type: TABLE 42 - +# CHECK-DEFAULT-NEXT: Tables: 43 - +# CHECK-DEFAULT-NEXT: - Index: 0 44 - +# CHECK-DEFAULT-NEXT: ElemType: FUNCREF 45 - +# CHECK-DEFAULT-NEXT: Limits: 46 - +# CHECK-DEFAULT-NEXT: Flags: [ HAS_MAX ] 47 - +# CHECK-DEFAULT-NEXT: Minimum: 0x2 48 - +# CHECK-DEFAULT-NEXT: Maximum: 0x2 49 - + 50 - +# CHECK-DEFAULT: - Type: GLOBAL 51 - +# CHECK-DEFAULT-NEXT: Globals: 52 - +# CHECK-DEFAULT-NEXT: - Index: 0 53 - +# CHECK-DEFAULT-NEXT: Type: I32 54 - +# CHECK-DEFAULT-NEXT: Mutable: true 55 - +# CHECK-DEFAULT-NEXT: InitExpr: 56 - +# CHECK-DEFAULT-NEXT: Opcode: I32_CONST 57 - +# CHECK-DEFAULT-NEXT: Value: 66560 58 - +# CHECK-DEFAULT-NEXT: - Index: 1 59 - +# CHECK-DEFAULT-NEXT: Type: I32 60 - +# CHECK-DEFAULT-NEXT: Mutable: false 61 - +# CHECK-DEFAULT-NEXT: InitExpr: 62 - +# CHECK-DEFAULT-NEXT: Opcode: I32_CONST 63 - +# CHECK-DEFAULT-NEXT: Value: 1 64 - + 65 - +# CHECK-DEFAULT: - Type: EXPORT 66 - +# CHECK-DEFAULT: - Name: __table_base 67 - +# CHECK-DEFAULT-NEXT: Kind: GLOBAL 68 - +# CHECK-DEFAULT-NEXT: Index: 1 69 - + 70 - +# CHECK-100: - Type: TABLE 71 - +# CHECK-100-NEXT: Tables: 72 - +# CHECK-100-NEXT: - Index: 0 73 - +# CHECK-100-NEXT: ElemType: FUNCREF 74 - +# CHECK-100-NEXT: Limits: 75 - +# CHECK-100-NEXT: Flags: [ HAS_MAX ] 76 - +# CHECK-100-NEXT: Minimum: 0x65 77 - +# CHECK-100-NEXT: Maximum: 0x65 78 - + 79 - +# CHECK-100: - Type: GLOBAL 80 - +# CHECK-100-NEXT: Globals: 81 - +# CHECK-100-NEXT: - Index: 0 82 - +# CHECK-100-NEXT: Type: I32 83 - +# CHECK-100-NEXT: Mutable: true 84 - +# CHECK-100-NEXT: InitExpr: 85 - +# CHECK-100-NEXT: Opcode: I32_CONST 86 - +# CHECK-100-NEXT: Value: 66560 87 - +# CHECK-100-NEXT: - Index: 1 88 - +# CHECK-100-NEXT: Type: I32 89 - +# CHECK-100-NEXT: Mutable: false 90 - +# CHECK-100-NEXT: InitExpr: 91 - +# CHECK-100-NEXT: Opcode: I32_CONST 92 - +# CHECK-100-NEXT: Value: 100 93 - + 94 - +# CHECK-100: - Type: EXPORT 95 - +# CHECK-100: - Name: __table_base 96 - +# CHECK-100-NEXT: Kind: GLOBAL 97 - +# CHECK-100-NEXT: Index: 1 98 - diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp 99 - index 84304881f5ca34e..c2f5f0185781f36 100644 100 - --- a/wasm/Driver.cpp 101 - +++ b/wasm/Driver.cpp 102 - @@ -502,6 +502,7 @@ static void readConfigs(opt::InputArgList &args) { 103 - 104 - config->initialMemory = args::getInteger(args, OPT_initial_memory, 0); 105 - config->globalBase = args::getInteger(args, OPT_global_base, 0); 106 - + config->tableBase = args::getInteger(args, OPT_table_base, 0); 107 - config->maxMemory = args::getInteger(args, OPT_max_memory, 0); 108 - config->zStackSize = 109 - args::getZOptionValue(args, OPT_z, "stack-size", WasmPageSize); 110 - @@ -573,6 +574,17 @@ static void setConfigs() { 111 - if (config->exportTable) 112 - error("-shared/-pie is incompatible with --export-table"); 113 - config->importTable = true; 114 - + } else { 115 - + // Default table base. Defaults to 1, reserving 0 for the NULL function 116 - + // pointer. 117 - + if (!config->tableBase) 118 - + config->tableBase = 1; 119 - + // The default offset for static/global data, for when --global-base is 120 - + // not specified on the command line. The precise value of 1024 is 121 - + // somewhat arbitrary, and pre-dates wasm-ld (Its the value that 122 - + // emscripten used prior to wasm-ld). 123 - + if (!config->globalBase && !config->relocatable && !config->stackFirst) 124 - + config->globalBase = 1024; 125 - } 126 - 127 - if (config->relocatable) { 128 - @@ -666,8 +678,11 @@ static void checkOptions(opt::InputArgList &args) { 129 - warn("-Bsymbolic is only meaningful when combined with -shared"); 130 - } 131 - 132 - - if (config->globalBase && config->isPic) { 133 - - error("--global-base may not be used with -shared/-pie"); 134 - + if (config->isPic) { 135 - + if (config->globalBase) 136 - + error("--global-base may not be used with -shared/-pie"); 137 - + if (config->tableBase) 138 - + error("--table-base may not be used with -shared/-pie"); 139 - } 140 - } 141 - 142 - diff --git a/wasm/Options.td b/wasm/Options.td 143 - index 50417d2928e0a34..bb764396bf4df14 100644 144 - --- a/wasm/Options.td 145 - +++ b/wasm/Options.td 146 - @@ -191,7 +191,7 @@ def growable_table: FF<"growable-table">, 147 - HelpText<"Remove maximum size from function table, allowing table to grow">; 148 - 149 - def global_base: JJ<"global-base=">, 150 - - HelpText<"Where to start to place global data">; 151 - + HelpText<"Memory offset at which to place global data (Defaults to 1024)">; 152 - 153 - def import_memory: FF<"import-memory">, 154 - HelpText<"Import the module's memory from the default module of \"env\" with the name \"memory\".">; 155 - @@ -224,6 +224,9 @@ def no_entry: FF<"no-entry">, 156 - def stack_first: FF<"stack-first">, 157 - HelpText<"Place stack at start of linear memory rather than after data">; 158 - 159 - +def table_base: JJ<"table-base=">, 160 - + HelpText<"Table offset at which to place address taken functions (Defaults to 1)">; 161 - + 162 - defm whole_archive: B<"whole-archive", 163 - "Force load of all members in a static library", 164 - "Do not force load of all members in a static library (default)">; 165 - diff --git a/wasm/Writer.cpp b/wasm/Writer.cpp 166 - index f25d358dc5bae6f..0576bf2907e49c4 100644 167 - --- a/wasm/Writer.cpp 168 - +++ b/wasm/Writer.cpp 169 - @@ -358,13 +358,6 @@ void Writer::layoutMemory() { 170 - memoryPtr = config->globalBase; 171 - } 172 - } else { 173 - - if (!config->globalBase && !config->relocatable && !config->isPic) { 174 - - // The default offset for static/global data, for when --global-base is 175 - - // not specified on the command line. The precise value of 1024 is 176 - - // somewhat arbitrary, and pre-dates wasm-ld (Its the value that 177 - - // emscripten used prior to wasm-ld). 178 - - config->globalBase = 1024; 179 - - } 180 - memoryPtr = config->globalBase; 181 - } 182 - 183 - @@ -1685,7 +1678,6 @@ void Writer::run() { 184 - // For PIC code the table base is assigned dynamically by the loader. 185 - // For non-PIC, we start at 1 so that accessing table index 0 always traps. 186 - if (!config->isPic) { 187 - - config->tableBase = 1; 188 - if (WasmSym::definedTableBase) 189 - WasmSym::definedTableBase->setVA(config->tableBase); 190 - if (WasmSym::definedTableBase32)
-46
pkgs/development/compilers/llvm/16/lld/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 3d6225646fe6..9b5d0b15af13 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE) 6 - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") 7 - list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") 8 - 9 - - # Turn into CACHE PATHs for overwriting 10 - - set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 11 - - set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree") 12 - - set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 13 - + # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets 14 - + # LLVM_CONFIG. 15 - + if (NOT LLVM_CONFIG_FOUND) 16 - + # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 17 - + # path is removed. 18 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 19 - + set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 20 - + # N.B. this is just a default value, the CACHE PATHs below can be overridden. 21 - + set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 22 - + else() 23 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 24 - + endif() 25 - + 26 - + set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 27 - + set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 28 - + set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 29 - 30 - find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} 31 - NO_DEFAULT_PATH) 32 - diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 33 - index d3924f7243d4..42a7cd62281c 100644 34 - --- a/cmake/modules/AddLLD.cmake 35 - +++ b/cmake/modules/AddLLD.cmake 36 - @@ -18,8 +18,8 @@ macro(add_lld_library name) 37 - install(TARGETS ${name} 38 - COMPONENT ${name} 39 - ${export_to_lldtargets} 40 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 41 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 42 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 43 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 44 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 45 - 46 - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
-14
pkgs/development/compilers/llvm/16/lldb/resource-dir.patch
··· 1 - diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake 2 - index ec06ba285f27..286162f098fb 100644 3 - --- a/cmake/modules/LLDBConfig.cmake 4 - +++ b/cmake/modules/LLDBConfig.cmake 5 - @@ -290,7 +290,8 @@ if (NOT TARGET clang-resource-headers) 6 - # could be and pick the first that exists. 7 - foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}" 8 - "${LLVM_BUILD_LIBRARY_DIR}" 9 - - "${LLVM_LIBRARY_DIR}") 10 - + "${LLVM_LIBRARY_DIR}" 11 - + "@clangLibDir@") 12 - # Build the resource directory path by appending 'clang/<version number>'. 13 - set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}") 14 - if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}")
-161
pkgs/development/compilers/llvm/16/llvm/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 7e25e0407db2..72f031a82b75 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -995,7 +995,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") 6 - add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src 7 - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) 8 - install(TARGETS tf_xla_runtime EXPORT LLVMExports 9 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) 10 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) 11 - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime) 12 - # Once we add more modules, we should handle this more automatically. 13 - if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL) 14 - diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 15 - index 93e6d67551de..8d367457af5a 100644 16 - --- a/cmake/modules/AddLLVM.cmake 17 - +++ b/cmake/modules/AddLLVM.cmake 18 - @@ -874,8 +874,8 @@ macro(add_llvm_library name) 19 - get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) 20 - install(TARGETS ${name} 21 - ${export_to_llvmexports} 22 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 23 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 24 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 25 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 26 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) 27 - 28 - if (NOT LLVM_ENABLE_IDE) 29 - @@ -2043,7 +2043,7 @@ function(llvm_install_library_symlink name dest type) 30 - set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) 31 - set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX}) 32 - 33 - - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) 34 - + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 35 - if(WIN32 AND "${type}" STREQUAL "SHARED") 36 - set(output_dir "${CMAKE_INSTALL_BINDIR}") 37 - endif() 38 - @@ -2312,16 +2312,37 @@ function(llvm_setup_rpath name) 39 - 40 - if (APPLE) 41 - set(_install_name_dir INSTALL_NAME_DIR "@rpath") 42 - - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 43 - + set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 44 - elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS) 45 - # $ORIGIN is not interpreted at link time by aix ld. 46 - # Since BUILD_SHARED_LIBS is only recommended for use by developers, 47 - # hardcode the rpath to build/install lib dir first in this mode. 48 - # FIXME: update this when there is better solution. 49 - - set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 50 - + set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 51 - elseif(UNIX) 52 - - set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 53 - - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}") 54 - + # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back 55 - + # to `_install_rpath` here. 56 - + # 57 - + # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e. 58 - + # clang); instead LLVM is its own package and thus lands at its own nix 59 - + # store path. This makes it so that the default relative rpath (`../lib/`) 60 - + # does not point at the LLVM shared objects. 61 - + # 62 - + # More discussion here: 63 - + # - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329 64 - + # - https://reviews.llvm.org/D146918 (16.0.5+) 65 - + # 66 - + # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is 67 - + # no potential that this will result in us pulling in the "wrong" LLVM. 68 - + # Adding this to the build rpath means we aren't forced to use 69 - + # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build 70 - + # dir, pre-install, will have the right rpath for LLVM). 71 - + # 72 - + # As noted in the differential above, an alternative solution is to have 73 - + # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set 74 - + # `CMAKE_INSTALL_RPATH`. 75 - + set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 76 - + set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 77 - if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 78 - set_property(TARGET ${name} APPEND_STRING PROPERTY 79 - LINK_FLAGS " -Wl,-z,origin ") 80 - diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake 81 - index 891c9e6d618c..8d963f3b0069 100644 82 - --- a/cmake/modules/AddOCaml.cmake 83 - +++ b/cmake/modules/AddOCaml.cmake 84 - @@ -147,9 +147,9 @@ function(add_ocaml_library name) 85 - endforeach() 86 - 87 - if( APPLE ) 88 - - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 89 - + set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 90 - elseif( UNIX ) 91 - - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 92 - + set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 93 - endif() 94 - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 95 - 96 - diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 97 - index d99af79aa38e..21e794224b99 100644 98 - --- a/cmake/modules/CMakeLists.txt 99 - +++ b/cmake/modules/CMakeLists.txt 100 - @@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS 101 - ) 102 - list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS) 103 - 104 - -extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}") 105 - +extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") 106 - set(LLVM_CONFIG_LIBRARY_DIRS 107 - "${LLVM_CONFIG_LIBRARY_DIR}" 108 - # FIXME: Should there be other entries here? 109 - diff --git a/docs/CMake.rst b/docs/CMake.rst 110 - index 7926de258ec8..5ae01adc3905 100644 111 - --- a/docs/CMake.rst 112 - +++ b/docs/CMake.rst 113 - @@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below. 114 - **LLVM_LIBDIR_SUFFIX**:STRING 115 - Extra suffix to append to the directory where libraries are to be 116 - installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` 117 - - to install libraries to ``/usr/lib64``. 118 - + to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``. 119 - 120 - **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING 121 - Building the llvm toolchain can use a lot of resources, particularly 122 - @@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``. 123 - The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*. 124 - Defaults to "bin". 125 - 126 - +**CMAKE_INSTALL_LIBDIR**:PATH 127 - + The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*. 128 - + Defaults to "lib". 129 - + 130 - **CMAKE_INSTALL_INCLUDEDIR**:PATH 131 - The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*. 132 - Defaults to "include". 133 - diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 134 - index 370005cd8d7d..7e790bc52111 100644 135 - --- a/tools/llvm-config/BuildVariables.inc.in 136 - +++ b/tools/llvm-config/BuildVariables.inc.in 137 - @@ -23,6 +23,7 @@ 138 - #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" 139 - #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" 140 - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" 141 - +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" 142 - #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" 143 - #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@" 144 - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" 145 - diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 146 - index b1d795a0a349..de6cb1514f05 100644 147 - --- a/tools/llvm-config/llvm-config.cpp 148 - +++ b/tools/llvm-config/llvm-config.cpp 149 - @@ -366,7 +366,11 @@ int main(int argc, char **argv) { 150 - sys::fs::make_absolute(ActivePrefix, Path); 151 - ActiveBinDir = std::string(Path.str()); 152 - } 153 - - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; 154 - + { 155 - + SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX); 156 - + sys::fs::make_absolute(ActivePrefix, Path); 157 - + ActiveLibDir = std::string(Path.str()); 158 - + } 159 - { 160 - SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR); 161 - sys::fs::make_absolute(ActivePrefix, Path);
-17
pkgs/development/compilers/llvm/16/llvm/lit-shell-script-runner-set-dyld-library-path.patch
··· 1 - diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py 2 - index 0242e0b75af3..d732011306f7 100644 3 - --- a/utils/lit/lit/TestRunner.py 4 - +++ b/utils/lit/lit/TestRunner.py 5 - @@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd): 6 - f.write('@echo off\n') 7 - f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands)) 8 - else: 9 - + # This env var is *purged* when invoking subprocesses so we have to 10 - + # manually set it from within the bash script in order for the commands 11 - + # in run lines to see this var: 12 - + if "DYLD_LIBRARY_PATH" in test.config.environment: 13 - + f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n') 14 - + 15 - for i, ln in enumerate(commands): 16 - match = re.match(kPdbgRegex, ln) 17 - if match:
-79
pkgs/development/compilers/llvm/16/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
··· 1 - diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py 2 - index 81e8dc04acea..479ff95681e2 100644 3 - --- a/test/Unit/lit.cfg.py 4 - +++ b/test/Unit/lit.cfg.py 5 - @@ -3,6 +3,7 @@ 6 - # Configuration file for the 'lit' test runner. 7 - 8 - import os 9 - +import platform 10 - import subprocess 11 - 12 - import lit.formats 13 - @@ -55,3 +56,26 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): 14 - # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate. 15 - if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ: 16 - config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE'] 17 - + 18 - +# Add the LLVM dynamic libs to the platform-specific loader search path env var: 19 - +# 20 - +# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify.. 21 - +def find_shlibpath_var(): 22 - + if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']: 23 - + yield 'LD_LIBRARY_PATH' 24 - + elif platform.system() == 'Darwin': 25 - + yield 'DYLD_LIBRARY_PATH' 26 - + elif platform.system() == 'Windows': 27 - + yield 'PATH' 28 - + elif platform.system() == 'AIX': 29 - + yield 'LIBPATH' 30 - + 31 - +for shlibpath_var in find_shlibpath_var(): 32 - + shlibpath = os.path.pathsep.join( 33 - + (config.shlibdir, 34 - + config.environment.get(shlibpath_var, ''))) 35 - + config.environment[shlibpath_var] = shlibpath 36 - + break 37 - +else: 38 - + lit_config.warning("unable to inject shared library path on '{}'" 39 - + .format(platform.system())) 40 - diff --git a/test/lit.cfg.py b/test/lit.cfg.py 41 - index 75a38b4c5dad..856fc75c9d74 100644 42 - --- a/test/lit.cfg.py 43 - +++ b/test/lit.cfg.py 44 - @@ -42,6 +42,26 @@ llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True) 45 - llvm_config.with_system_environment( 46 - ['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP']) 47 - 48 - +# Add the LLVM dynamic libs to the platform-specific loader search path env var: 49 - +# 50 - +# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify.. 51 - +def find_shlibpath_var(): 52 - + if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']: 53 - + yield 'LD_LIBRARY_PATH' 54 - + elif platform.system() == 'Darwin': 55 - + yield 'DYLD_LIBRARY_PATH' 56 - + elif platform.system() == 'Windows': 57 - + yield 'PATH' 58 - + elif platform.system() == 'AIX': 59 - + yield 'LIBPATH' 60 - + 61 - +for shlibpath_var in find_shlibpath_var(): 62 - + shlibpath = config.llvm_shlib_dir 63 - + llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True) 64 - + break 65 - +else: 66 - + lit_config.warning("unable to inject shared library path on '{}'" 67 - + .format(platform.system())) 68 - 69 - # Set up OCAMLPATH to include newly built OCaml libraries. 70 - top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml') 71 - @@ -318,7 +338,7 @@ def have_cxx_shared_library(): 72 - 73 - try: 74 - readobj_cmd = subprocess.Popen( 75 - - [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE) 76 - + [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE, env=config.environment) 77 - except OSError: 78 - print('could not exec llvm-readobj') 79 - return False
-21
pkgs/development/compilers/llvm/16/openmp/fix-find-tool.patch
··· 1 - diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt 2 - index 49b398c9f765..6f1dd1340010 100644 3 - --- a/libomptarget/DeviceRTL/CMakeLists.txt 4 - +++ b/libomptarget/DeviceRTL/CMakeLists.txt 5 - @@ -27,11 +27,11 @@ endif() 6 - if (LLVM_DIR) 7 - # Builds that use pre-installed LLVM have LLVM_DIR set. 8 - # A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route 9 - - find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 10 - - find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 11 - - find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 12 - - find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 13 - - find_program(EXTRACT_TOOL llvm-extract PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) 14 - + find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR}) 15 - + find_program(PACKAGER_TOOL clang-offload-packager PATHS ${LLVM_TOOLS_BINARY_DIR}) 16 - + find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}) 17 - + find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR}) 18 - + find_program(EXTRACT_TOOL llvm-extract PATHS ${LLVM_TOOLS_BINARY_DIR}) 19 - if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL) OR (NOT EXTRACT_TOOL) OR (NOT PACKAGER_TOOL)) 20 - libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL}, opt: ${OPT_TOOL}, llvm-extract: ${EXTRACT_TOOL}, or clang-offload-packager: ${PACKAGER_TOOL}") 21 - return()
-22
pkgs/development/compilers/llvm/16/openmp/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b6ddbe90516d..311ab1d50e7f 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD) 6 - set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING 7 - "Suffix of lib installation directory, e.g. 64 => lib64") 8 - # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. 9 - - set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}") 10 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}") 11 - 12 - # Group test settings. 13 - set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING 14 - @@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD) 15 - else() 16 - set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) 17 - # If building in tree, we honor the same install suffix LLVM uses. 18 - - set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}") 19 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 20 - 21 - if (NOT MSVC) 22 - set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
pkgs/development/compilers/llvm/16/openmp/run-lit-directly.patch pkgs/development/compilers/llvm/18/openmp/run-lit-directly.patch
-39
pkgs/development/compilers/llvm/17/clang/aarch64-tblgen.patch
··· 1 - diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def 2 - index ef0dad0f2..afd101b00 100644 3 - --- a/include/clang/Basic/TokenKinds.def 4 - +++ b/include/clang/Basic/TokenKinds.def 5 - @@ -753,7 +753,7 @@ KEYWORD(__builtin_sycl_unique_stable_name, KEYSYCL) 6 - 7 - // Keywords defined by Attr.td. 8 - #ifndef KEYWORD_ATTRIBUTE 9 - -#define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL) 10 - +#define KEYWORD_ATTRIBUTE(X, EMPTY) KEYWORD(EMPTY ## X, KEYALL) 11 - #endif 12 - #include "clang/Basic/AttrTokenKinds.inc" 13 - 14 - diff --git a/include/clang/Basic/TokenKinds.h b/include/clang/Basic/TokenKinds.h 15 - index e4857405b..ff117bd5a 100644 16 - --- a/include/clang/Basic/TokenKinds.h 17 - +++ b/include/clang/Basic/TokenKinds.h 18 - @@ -109,7 +109,7 @@ bool isPragmaAnnotation(TokenKind K); 19 - 20 - inline constexpr bool isRegularKeywordAttribute(TokenKind K) { 21 - return (false 22 - -#define KEYWORD_ATTRIBUTE(X) || (K == tok::kw_##X) 23 - +#define KEYWORD_ATTRIBUTE(X, ...) || (K == tok::kw_##X) 24 - #include "clang/Basic/AttrTokenKinds.inc" 25 - ); 26 - } 27 - diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp 28 - index b5813c6ab..79db17501 100644 29 - --- a/utils/TableGen/ClangAttrEmitter.cpp 30 - +++ b/utils/TableGen/ClangAttrEmitter.cpp 31 - @@ -3430,7 +3430,7 @@ void EmitClangAttrTokenKinds(RecordKeeper &Records, raw_ostream &OS) { 32 - "RegularKeyword attributes with arguments are not " 33 - "yet supported"); 34 - OS << "KEYWORD_ATTRIBUTE(" 35 - - << S.getSpellingRecord().getValueAsString("Name") << ")\n"; 36 - + << S.getSpellingRecord().getValueAsString("Name") << ", )\n"; 37 - } 38 - OS << "#undef KEYWORD_ATTRIBUTE\n"; 39 - }
-98
pkgs/development/compilers/llvm/17/clang/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index f7936d72e088..a362fa49b534 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -31,7 +31,21 @@ if(CLANG_BUILT_STANDALONE) 6 - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") 7 - list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") 8 - 9 - - # Turn into CACHE PATHs for overwritting 10 - + # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets 11 - + # LLVM_CONFIG. 12 - + if (NOT LLVM_CONFIG_FOUND) 13 - + # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 14 - + # path is removed. 15 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 16 - + set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 17 - + # N.B. this is just a default value, the CACHE PATHs below can be overriden. 18 - + set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 19 - + set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}") 20 - + set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}") 21 - + else() 22 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 23 - + endif() 24 - + 25 - set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 26 - set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree") 27 - set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 28 - diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 29 - index 75b0080f6715..c895b884cd27 100644 30 - --- a/cmake/modules/AddClang.cmake 31 - +++ b/cmake/modules/AddClang.cmake 32 - @@ -119,8 +119,8 @@ macro(add_clang_library name) 33 - install(TARGETS ${lib} 34 - COMPONENT ${lib} 35 - ${export_to_clangtargets} 36 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 37 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 38 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 39 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 40 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 41 - 42 - if (NOT LLVM_ENABLE_IDE) 43 - diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt 44 - index f2b0c5cddcbb..52f37fc368ce 100644 45 - --- a/lib/Headers/CMakeLists.txt 46 - +++ b/lib/Headers/CMakeLists.txt 47 - @@ -473,6 +473,7 @@ add_header_target("windows-resource-headers" ${windows_only_files}) 48 - add_header_target("utility-resource-headers" ${utility_files}) 49 - 50 - get_clang_resource_dir(header_install_dir SUBDIR include) 51 - +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${CLANG_VERSION_MAJOR}/include) 52 - 53 - ############################################################# 54 - # Install rules for the catch-all clang-resource-headers target 55 - diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt 56 - index 4f23065a2472..6a0f55991e24 100644 57 - --- a/tools/libclang/CMakeLists.txt 58 - +++ b/tools/libclang/CMakeLists.txt 59 - @@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS}) 60 - COMPONENT 61 - libclang-python-bindings 62 - DESTINATION 63 - - "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 64 - + "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages") 65 - endforeach() 66 - if(NOT LLVM_ENABLE_IDE) 67 - add_custom_target(libclang-python-bindings) 68 - diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt 69 - index 3aca22c0b0a8..3115353e3fe3 100644 70 - --- a/tools/scan-build-py/CMakeLists.txt 71 - +++ b/tools/scan-build-py/CMakeLists.txt 72 - @@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild}) 73 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib}) 74 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib}) 75 - install(FILES lib/libscanbuild/${lib} 76 - - DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild 77 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild" 78 - COMPONENT scan-build-py) 79 - endforeach() 80 - 81 - @@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources}) 82 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource}) 83 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource}) 84 - install(FILES lib/libscanbuild/resources/${resource} 85 - - DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources 86 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources" 87 - COMPONENT scan-build-py) 88 - endforeach() 89 - 90 - @@ -122,7 +122,7 @@ foreach(lib ${LibEar}) 91 - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib}) 92 - list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib}) 93 - install(FILES lib/libear/${lib} 94 - - DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear 95 - + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear" 96 - COMPONENT scan-build-py) 97 - endforeach() 98 -
-29
pkgs/development/compilers/llvm/17/clang/purity.patch
··· 1 - From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001 2 - From: Will Dietz <w@wdtz.org> 3 - Date: Thu, 18 May 2017 11:56:12 -0500 4 - Subject: [PATCH] "purity" patch for 5.0 5 - 6 - --- 7 - lib/Driver/ToolChains/Gnu.cpp | 7 ------- 8 - 1 file changed, 7 deletions(-) 9 - 10 - diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp 11 - index fe3c0191bb..c6a482bece 100644 12 - --- a/lib/Driver/ToolChains/Gnu.cpp 13 - +++ b/lib/Driver/ToolChains/Gnu.cpp 14 - @@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 15 - } else { 16 - if (Args.hasArg(options::OPT_rdynamic)) 17 - CmdArgs.push_back("-export-dynamic"); 18 - 19 - - if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE && 20 - - !Args.hasArg(options::OPT_r)) { 21 - - CmdArgs.push_back("-dynamic-linker"); 22 - - CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + 23 - - ToolChain.getDynamicLinker(Args))); 24 - - } 25 - } 26 - 27 - CmdArgs.push_back("-o"); 28 - -- 29 - 2.11.0
-20
pkgs/development/compilers/llvm/17/compiler-rt/gnu-install-dirs.patch
··· 1 - diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake 2 - index 8a6219568b3f..30ee68a47ccf 100644 3 - --- a/cmake/base-config-ix.cmake 4 - +++ b/cmake/base-config-ix.cmake 5 - @@ -100,13 +100,13 @@ endif() 6 - if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 7 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 8 - ${COMPILER_RT_OUTPUT_DIR}/lib) 9 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib) 10 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}") 11 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 12 - "Path where built compiler-rt libraries should be installed.") 13 - else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) 14 - set(COMPILER_RT_OUTPUT_LIBRARY_DIR 15 - ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) 16 - - extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}") 17 - + extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}") 18 - set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH 19 - "Path where built compiler-rt libraries should be installed.") 20 - endif()
-46
pkgs/development/compilers/llvm/17/lld/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 3d6225646fe6..9b5d0b15af13 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE) 6 - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") 7 - list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") 8 - 9 - - # Turn into CACHE PATHs for overwriting 10 - - set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 11 - - set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree") 12 - - set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree") 13 - + # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets 14 - + # LLVM_CONFIG. 15 - + if (NOT LLVM_CONFIG_FOUND) 16 - + # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config 17 - + # path is removed. 18 - + set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS}) 19 - + set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}") 20 - + # N.B. this is just a default value, the CACHE PATHs below can be overridden. 21 - + set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm") 22 - + else() 23 - + set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}") 24 - + endif() 25 - + 26 - + set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed") 27 - + set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree") 28 - + set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree") 29 - 30 - find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} 31 - NO_DEFAULT_PATH) 32 - diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake 33 - index d3924f7243d4..42a7cd62281c 100644 34 - --- a/cmake/modules/AddLLD.cmake 35 - +++ b/cmake/modules/AddLLD.cmake 36 - @@ -18,8 +18,8 @@ macro(add_lld_library name) 37 - install(TARGETS ${name} 38 - COMPONENT ${name} 39 - ${export_to_lldtargets} 40 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} 41 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} 42 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 43 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" 44 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") 45 - 46 - if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
-137
pkgs/development/compilers/llvm/17/llvm/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 471817d68286..c51463304159 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -1010,7 +1010,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "") 6 - add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src 7 - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime) 8 - install(TARGETS tf_xla_runtime EXPORT LLVMExports 9 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) 10 - + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime) 11 - set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime) 12 - # Once we add more modules, we should handle this more automatically. 13 - if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL) 14 - diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 15 - index 230620c37027..dd16cab1835e 100644 16 - --- a/cmake/modules/AddLLVM.cmake 17 - +++ b/cmake/modules/AddLLVM.cmake 18 - @@ -876,8 +876,8 @@ macro(add_llvm_library name) 19 - get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella}) 20 - install(TARGETS ${name} 21 - ${export_to_llvmexports} 22 - - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 23 - - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name} 24 - + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 25 - + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name} 26 - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) 27 - 28 - if (NOT LLVM_ENABLE_IDE) 29 - @@ -2069,7 +2069,7 @@ function(llvm_install_library_symlink name dest type) 30 - set(LLVM_LINK_OR_COPY copy) 31 - endif() 32 - 33 - - set(output_dir lib${LLVM_LIBDIR_SUFFIX}) 34 - + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) 35 - if(WIN32 AND "${type}" STREQUAL "SHARED") 36 - set(output_dir "${CMAKE_INSTALL_BINDIR}") 37 - endif() 38 - @@ -2344,16 +2344,37 @@ function(llvm_setup_rpath name) 39 - 40 - if (APPLE) 41 - set(_install_name_dir INSTALL_NAME_DIR "@rpath") 42 - - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 43 - + set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 44 - elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS) 45 - # $ORIGIN is not interpreted at link time by aix ld. 46 - # Since BUILD_SHARED_LIBS is only recommended for use by developers, 47 - # hardcode the rpath to build/install lib dir first in this mode. 48 - # FIXME: update this when there is better solution. 49 - - set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 50 - + set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 51 - elseif(UNIX) 52 - - set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 53 - - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}") 54 - + # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back 55 - + # to `_install_rpath` here. 56 - + # 57 - + # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e. 58 - + # clang); instead LLVM is its own package and thus lands at its own nix 59 - + # store path. This makes it so that the default relative rpath (`../lib/`) 60 - + # does not point at the LLVM shared objects. 61 - + # 62 - + # More discussion here: 63 - + # - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329 64 - + # - https://reviews.llvm.org/D146918 (16.0.5+) 65 - + # 66 - + # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is 67 - + # no potential that this will result in us pulling in the "wrong" LLVM. 68 - + # Adding this to the build rpath means we aren't forced to use 69 - + # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build 70 - + # dir, pre-install, will have the right rpath for LLVM). 71 - + # 72 - + # As noted in the differential above, an alternative solution is to have 73 - + # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set 74 - + # `CMAKE_INSTALL_RPATH`. 75 - + set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) 76 - + set(_install_rpath ${extra_libdir}) 77 - if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") 78 - set_property(TARGET ${name} APPEND_STRING PROPERTY 79 - LINK_FLAGS " -Wl,-z,origin ") 80 - diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake 81 - index 891c9e6d618c..8d963f3b0069 100644 82 - --- a/cmake/modules/AddOCaml.cmake 83 - +++ b/cmake/modules/AddOCaml.cmake 84 - @@ -147,9 +147,9 @@ function(add_ocaml_library name) 85 - endforeach() 86 - 87 - if( APPLE ) 88 - - set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}") 89 - + set(ocaml_rpath "${LLVM_LIBRARY_DIR}") 90 - elseif( UNIX ) 91 - - set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}") 92 - + set(ocaml_rpath "${LLVM_LIBRARY_DIR}") 93 - endif() 94 - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") 95 - 96 - diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 97 - index d99af79aa38e..21e794224b99 100644 98 - --- a/cmake/modules/CMakeLists.txt 99 - +++ b/cmake/modules/CMakeLists.txt 100 - @@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS 101 - ) 102 - list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS) 103 - 104 - -extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}") 105 - +extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}") 106 - set(LLVM_CONFIG_LIBRARY_DIRS 107 - "${LLVM_CONFIG_LIBRARY_DIR}" 108 - # FIXME: Should there be other entries here? 109 - diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 110 - index 370005cd8d7d..7e790bc52111 100644 111 - --- a/tools/llvm-config/BuildVariables.inc.in 112 - +++ b/tools/llvm-config/BuildVariables.inc.in 113 - @@ -23,6 +23,7 @@ 114 - #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@" 115 - #define LLVM_BUILDMODE "@LLVM_BUILDMODE@" 116 - #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" 117 - +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" 118 - #define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" 119 - #define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@" 120 - #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@" 121 - diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp 122 - index e86eb2b44b10..f63e207e792e 100644 123 - --- a/tools/llvm-config/llvm-config.cpp 124 - +++ b/tools/llvm-config/llvm-config.cpp 125 - @@ -366,7 +366,11 @@ int main(int argc, char **argv) { 126 - sys::fs::make_absolute(ActivePrefix, Path); 127 - ActiveBinDir = std::string(Path.str()); 128 - } 129 - - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; 130 - + { 131 - + SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX); 132 - + sys::fs::make_absolute(ActivePrefix, Path); 133 - + ActiveLibDir = std::string(Path.str()); 134 - + } 135 - { 136 - SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR); 137 - sys::fs::make_absolute(ActivePrefix, Path);
pkgs/development/compilers/llvm/17/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch pkgs/development/compilers/llvm/18/llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch
pkgs/development/compilers/llvm/17/openmp/fix-find-tool.patch pkgs/development/compilers/llvm/18/openmp/fix-find-tool.patch
-22
pkgs/development/compilers/llvm/17/openmp/gnu-install-dirs.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index b6ddbe90516d..311ab1d50e7f 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD) 6 - set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING 7 - "Suffix of lib installation directory, e.g. 64 => lib64") 8 - # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. 9 - - set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}") 10 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}") 11 - 12 - # Group test settings. 13 - set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING 14 - @@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD) 15 - else() 16 - set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) 17 - # If building in tree, we honor the same install suffix LLVM uses. 18 - - set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}") 19 - + set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}") 20 - 21 - if (NOT MSVC) 22 - set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
+30 -34
pkgs/development/compilers/llvm/common/bintools.nix
··· 22 22 inherit llvm lld; 23 23 }; 24 24 } 25 - ( 26 - '' 27 - mkdir -p $out/bin 28 - for prog in ${lld}/bin/*; do 29 - ln -s $prog $out/bin/${targetPrefix}$(basename $prog) 30 - done 31 - for prog in ${llvm}/bin/*; do 32 - ln -sf $prog $out/bin/${targetPrefix}$(basename $prog) 33 - done 25 + '' 26 + mkdir -p $out/bin 27 + for prog in ${lld}/bin/*; do 28 + ln -s $prog $out/bin/${targetPrefix}$(basename $prog) 29 + done 30 + for prog in ${llvm}/bin/*; do 31 + ln -sf $prog $out/bin/${targetPrefix}$(basename $prog) 32 + done 34 33 35 - llvmBin="${llvm}/bin" 34 + llvmBin="${llvm}/bin" 36 35 37 - ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}ar 38 - ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}dlltool 39 - ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}ranlib 40 - ln -s $llvmBin/llvm-cxxfilt $out/bin/${targetPrefix}c++filt 41 - ln -s $llvmBin/llvm-dwp $out/bin/${targetPrefix}dwp 42 - ln -s $llvmBin/llvm-nm $out/bin/${targetPrefix}nm 43 - ln -s $llvmBin/llvm-objcopy $out/bin/${targetPrefix}objcopy 44 - ln -s $llvmBin/llvm-objcopy $out/bin/${targetPrefix}strip 45 - ln -s $llvmBin/llvm-objdump $out/bin/${targetPrefix}objdump 46 - ln -s $llvmBin/llvm-readobj $out/bin/${targetPrefix}readelf 47 - ln -s $llvmBin/llvm-size $out/bin/${targetPrefix}size 48 - ln -s $llvmBin/llvm-strings $out/bin/${targetPrefix}strings 49 - ln -s $llvmBin/llvm-symbolizer $out/bin/${targetPrefix}addr2line 36 + ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}ar 37 + ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}dlltool 38 + ln -s $llvmBin/llvm-ar $out/bin/${targetPrefix}ranlib 39 + ln -s $llvmBin/llvm-cxxfilt $out/bin/${targetPrefix}c++filt 40 + ln -s $llvmBin/llvm-dwp $out/bin/${targetPrefix}dwp 41 + ln -s $llvmBin/llvm-nm $out/bin/${targetPrefix}nm 42 + ln -s $llvmBin/llvm-objcopy $out/bin/${targetPrefix}objcopy 43 + ln -s $llvmBin/llvm-objcopy $out/bin/${targetPrefix}strip 44 + ln -s $llvmBin/llvm-objdump $out/bin/${targetPrefix}objdump 45 + ln -s $llvmBin/llvm-readobj $out/bin/${targetPrefix}readelf 46 + ln -s $llvmBin/llvm-size $out/bin/${targetPrefix}size 47 + ln -s $llvmBin/llvm-strings $out/bin/${targetPrefix}strings 48 + ln -s $llvmBin/llvm-symbolizer $out/bin/${targetPrefix}addr2line 50 49 51 - if [ -e "$llvmBin/llvm-debuginfod" ]; then 52 - ln -s $llvmBin/llvm-debuginfod $out/bin/${targetPrefix}debuginfod 53 - ln -s $llvmBin/llvm-debuginfod-find $out/bin/${targetPrefix}debuginfod-find 54 - fi 50 + if [ -e "$llvmBin/llvm-debuginfod" ]; then 51 + ln -s $llvmBin/llvm-debuginfod $out/bin/${targetPrefix}debuginfod 52 + ln -s $llvmBin/llvm-debuginfod-find $out/bin/${targetPrefix}debuginfod-find 53 + fi 55 54 56 - ln -s ${lld}/bin/lld $out/bin/${targetPrefix}ld 55 + ln -s ${lld}/bin/lld $out/bin/${targetPrefix}ld 57 56 58 - # Only >=13 show GNU windres compatible in help 59 - '' 60 - + lib.optionalString (lib.versionAtLeast release_version "13") '' 61 - ln -s $llvmBin/llvm-rc $out/bin/${targetPrefix}windres 62 - '' 63 - ) 57 + # Only >=13 show GNU windres compatible in help 58 + ln -s $llvmBin/llvm-rc $out/bin/${targetPrefix}windres 59 + ''
+9 -15
pkgs/development/compilers/llvm/common/bolt/default.nix
··· 23 23 inherit version; 24 24 25 25 # Blank llvm dir just so relative path works 26 - src = runCommand "bolt-src-${finalAttrs.version}" { inherit (monorepoSrc) passthru; } ( 27 - '' 28 - mkdir $out 29 - '' 30 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 31 - cp -r ${monorepoSrc}/cmake "$out" 32 - '' 33 - + '' 34 - cp -r ${monorepoSrc}/${finalAttrs.pname} "$out" 35 - cp -r ${monorepoSrc}/third-party "$out" 26 + src = runCommand "bolt-src-${finalAttrs.version}" { inherit (monorepoSrc) passthru; } ('' 27 + mkdir $out 28 + cp -r ${monorepoSrc}/cmake "$out" 29 + cp -r ${monorepoSrc}/${finalAttrs.pname} "$out" 30 + cp -r ${monorepoSrc}/third-party "$out" 36 31 37 - # BOLT re-runs tablegen against LLVM sources, so needs them available. 38 - cp -r ${monorepoSrc}/llvm/ "$out" 39 - chmod -R +w $out/llvm 40 - '' 41 - ); 32 + # BOLT re-runs tablegen against LLVM sources, so needs them available. 33 + cp -r ${monorepoSrc}/llvm/ "$out" 34 + chmod -R +w $out/llvm 35 + ''); 42 36 43 37 sourceRoot = "${finalAttrs.src.name}/bolt"; 44 38
-13
pkgs/development/compilers/llvm/common/clang/clang-11-15-LLVMgold-path.patch
··· 1 - diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp 2 - index 6b6e276b8ce7..7896542a1202 100644 3 - --- a/lib/Driver/ToolChains/CommonArgs.cpp 4 - +++ b/lib/Driver/ToolChains/CommonArgs.cpp 5 - @@ -409,7 +409,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, 6 - 7 - SmallString<1024> Plugin; 8 - llvm::sys::path::native( 9 - - Twine(D.Dir) + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold" + Suffix, 10 - + Twine("@libllvmLibdir@" "/LLVMgold") + Suffix, 11 - Plugin); 12 - CmdArgs.push_back(Args.MakeArgString(Plugin)); 13 - }
+73 -182
pkgs/development/compilers/llvm/common/clang/default.nix
··· 28 28 29 29 src = 30 30 if monorepoSrc != null then 31 - runCommand "clang-src-${version}" { inherit (monorepoSrc) passthru; } ( 32 - '' 33 - mkdir -p "$out" 34 - '' 35 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 36 - cp -r ${monorepoSrc}/cmake "$out" 37 - '' 38 - + '' 39 - cp -r ${monorepoSrc}/clang "$out" 40 - cp -r ${monorepoSrc}/clang-tools-extra "$out" 41 - '' 42 - ) 31 + runCommand "clang-src-${version}" { inherit (monorepoSrc) passthru; } ('' 32 + mkdir -p "$out" 33 + cp -r ${monorepoSrc}/cmake "$out" 34 + cp -r ${monorepoSrc}/clang "$out" 35 + cp -r ${monorepoSrc}/clang-tools-extra "$out" 36 + '') 43 37 else 44 38 src; 45 39 ··· 52 58 # libraries. eg: `clang -munsupported hello.c -lc` 53 59 ./clang-unsupported-option.patch 54 60 ] 55 - ++ 56 - lib.optional (lib.versions.major release_version == "13") 57 - # Revert of https://reviews.llvm.org/D100879 58 - # The malloc alignment assumption is incorrect for jemalloc and causes 59 - # mis-compilation in firefox. 60 - # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1741454 61 - (getVersionFile "clang/revert-malloc-alignment-assumption.patch") 62 - ++ lib.optional (lib.versionOlder release_version "17") ( 63 - if lib.versionAtLeast release_version "14" then 64 - fetchpatch { 65 - name = "ignore-nostd-link.patch"; 66 - url = "https://github.com/llvm/llvm-project/commit/5b77e752dcd073846b89559d6c0e1a7699e58615.patch"; 67 - relative = "clang"; 68 - hash = "sha256-qzSAmoGY+7POkDhcGgQRPaNQ3+7PIcIc9cZuiE/eLkc="; 69 - } 70 - else 71 - ./ignore-nostd-link-13.diff 72 - ) 73 61 # Pass the correct path to libllvm 74 62 ++ [ 75 - (replaceVars 76 - ( 77 - if (lib.versionOlder release_version "16") then 78 - ./clang-11-15-LLVMgold-path.patch 79 - else 80 - ./clang-at-least-16-LLVMgold-path.patch 81 - ) 82 - { 83 - libllvmLibdir = "${libllvm.lib}/lib"; 84 - } 85 - ) 63 + (replaceVars ./clang-at-least-16-LLVMgold-path.patch { 64 + libllvmLibdir = "${libllvm.lib}/lib"; 65 + }) 86 66 ] 87 - # Backport version logic from Clang 16. This is needed by the following patch. 88 - ++ lib.optional (lib.versions.major release_version == "15") (fetchpatch { 89 - name = "clang-darwin-Use-consistent-version-define-stringifying-logic.patch"; 90 - url = "https://github.com/llvm/llvm-project/commit/60a33ded751c86fff9ac1c4bdd2b341fbe4b0649.patch?full_index=1"; 91 - includes = [ "lib/Basic/Targets/OSTargets.cpp" ]; 92 - stripLen = 1; 93 - hash = "sha256-YVTSg5eZLz3po2AUczPNXCK26JA3CuTh6Iqp7hAAKIs="; 94 - }) 95 - # Backport `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` support from Clang 17. 96 - # This is needed by newer SDKs (14+). 97 - ++ 98 - lib.optional 99 - ( 100 - lib.versionAtLeast (lib.versions.major release_version) "15" 101 - && lib.versionOlder (lib.versions.major release_version) "17" 102 - ) 103 - (fetchpatch { 104 - name = "clang-darwin-An-OS-version-preprocessor-define.patch"; 105 - url = "https://github.com/llvm/llvm-project/commit/c8e2dd8c6f490b68e41fe663b44535a8a21dfeab.patch?full_index=1"; 106 - includes = [ "lib/Basic/Targets/OSTargets.cpp" ]; 107 - stripLen = 1; 108 - hash = "sha256-Vs32kql7N6qtLqc12FtZHURcbenA7+N3E/nRRX3jdig="; 109 - }) 110 67 # Fixes a bunch of lambda-related crashes 111 68 # https://github.com/llvm/llvm-project/pull/93206 112 69 ++ lib.optional (lib.versions.major release_version == "18") (fetchpatch { ··· 70 125 ]; 71 126 stripLen = 1; 72 127 hash = "sha256-1NKej08R9SPlbDY/5b0OKUsHjX07i9brR84yXiPwi7E="; 73 - }) 74 - ++ 75 - lib.optional (stdenv.isAarch64 && lib.versions.major release_version == "17") 76 - # Fixes llvm17 tblgen builds on aarch64. 77 - # https://github.com/llvm/llvm-project/issues/106521#issuecomment-2337175680 78 - (getVersionFile "clang/aarch64-tblgen.patch"); 128 + }); 79 129 80 130 nativeBuildInputs = [ 81 131 cmake 82 132 python3 133 + ninja 83 134 ] 84 - ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) 85 - ++ lib.optional (lib.versionAtLeast version "18" && enableManpages) python3.pkgs.myst-parser 86 - ++ lib.optional enableManpages python3.pkgs.sphinx 135 + ++ lib.optionals enableManpages [ 136 + python3.pkgs.myst-parser 137 + python3.pkgs.sphinx 138 + ] 87 139 ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; 88 140 89 141 buildInputs = [ ··· 88 146 libllvm 89 147 ]; 90 148 91 - cmakeFlags = 92 - (lib.optionals (lib.versionAtLeast release_version "15") [ 93 - (lib.cmakeFeature "CLANG_INSTALL_PACKAGE_DIR" "${placeholder "dev"}/lib/cmake/clang") 94 - ]) 95 - ++ [ 96 - (lib.cmakeBool "CLANGD_BUILD_XPC" false) 97 - (lib.cmakeBool "LLVM_ENABLE_RTTI" true) 98 - (lib.cmakeFeature "LLVM_TABLEGEN_EXE" "${buildLlvmTools.tblgen}/bin/llvm-tblgen") 99 - (lib.cmakeFeature "CLANG_TABLEGEN" "${buildLlvmTools.tblgen}/bin/clang-tblgen") 100 - ] 101 - ++ lib.optionals (lib.versionAtLeast release_version "21") [ 102 - (lib.cmakeFeature "CLANG_RESOURCE_DIR" "${placeholder "lib"}/lib/clang/${lib.versions.major release_version}") 103 - ] 104 - ++ lib.optionals (lib.versionAtLeast release_version "17") [ 105 - (lib.cmakeBool "LLVM_INCLUDE_TESTS" false) 106 - ] 107 - ++ lib.optionals enableManpages [ 108 - (lib.cmakeBool "CLANG_INCLUDE_DOCS" true) 109 - (lib.cmakeBool "LLVM_ENABLE_SPHINX" true) 110 - (lib.cmakeBool "SPHINX_OUTPUT_MAN" true) 111 - (lib.cmakeBool "SPHINX_OUTPUT_HTML" false) 112 - (lib.cmakeBool "SPHINX_WARNINGS_AS_ERRORS" false) 113 - ] 114 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 115 - # Added in LLVM15: 116 - # `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb 117 - # `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7 118 - (lib.cmakeFeature "CLANG_TIDY_CONFUSABLE_CHARS_GEN" "${buildLlvmTools.tblgen}/bin/clang-tidy-confusable-chars-gen") 119 - ] 120 - ++ lib.optionals (lib.versionOlder release_version "20") [ 121 - # clang-pseudo removed in LLVM20: https://github.com/llvm/llvm-project/commit/ed8f78827895050442f544edef2933a60d4a7935 122 - (lib.cmakeFeature "CLANG_PSEUDO_GEN" "${buildLlvmTools.tblgen}/bin/clang-pseudo-gen") 123 - ] 124 - ++ lib.optional (lib.versionAtLeast release_version "20") ( 125 - lib.cmakeFeature "LLVM_DIR" "${libllvm.dev}/lib/cmake/llvm" 126 - ) 127 - ++ devExtraCmakeFlags; 149 + cmakeFlags = [ 150 + (lib.cmakeFeature "CLANG_INSTALL_PACKAGE_DIR" "${placeholder "dev"}/lib/cmake/clang") 151 + (lib.cmakeBool "CLANGD_BUILD_XPC" false) 152 + (lib.cmakeBool "LLVM_ENABLE_RTTI" true) 153 + (lib.cmakeFeature "LLVM_TABLEGEN_EXE" "${buildLlvmTools.tblgen}/bin/llvm-tblgen") 154 + (lib.cmakeFeature "CLANG_TABLEGEN" "${buildLlvmTools.tblgen}/bin/clang-tblgen") 155 + ] 156 + ++ lib.optionals (lib.versionAtLeast release_version "21") [ 157 + (lib.cmakeFeature "CLANG_RESOURCE_DIR" "${placeholder "lib"}/lib/clang/${lib.versions.major release_version}") 158 + ] 159 + # TODO: Clean up on `staging`. 160 + ++ [ 161 + (lib.cmakeBool "LLVM_INCLUDE_TESTS" false) 162 + ] 163 + ++ lib.optionals enableManpages [ 164 + (lib.cmakeBool "CLANG_INCLUDE_DOCS" true) 165 + (lib.cmakeBool "LLVM_ENABLE_SPHINX" true) 166 + (lib.cmakeBool "SPHINX_OUTPUT_MAN" true) 167 + (lib.cmakeBool "SPHINX_OUTPUT_HTML" false) 168 + (lib.cmakeBool "SPHINX_WARNINGS_AS_ERRORS" false) 169 + ] 170 + # TODO: Clean up on `staging`. 171 + ++ [ 172 + # Added in LLVM15: 173 + # `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb 174 + # `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7 175 + (lib.cmakeFeature "CLANG_TIDY_CONFUSABLE_CHARS_GEN" "${buildLlvmTools.tblgen}/bin/clang-tidy-confusable-chars-gen") 176 + ] 177 + ++ lib.optionals (lib.versionOlder release_version "20") [ 178 + # clang-pseudo removed in LLVM20: https://github.com/llvm/llvm-project/commit/ed8f78827895050442f544edef2933a60d4a7935 179 + (lib.cmakeFeature "CLANG_PSEUDO_GEN" "${buildLlvmTools.tblgen}/bin/clang-pseudo-gen") 180 + ] 181 + ++ lib.optional (lib.versionAtLeast release_version "20") ( 182 + lib.cmakeFeature "LLVM_DIR" "${libllvm.dev}/lib/cmake/llvm" 183 + ) 184 + ++ devExtraCmakeFlags; 128 185 129 186 postPatch = '' 130 187 # Make sure clang passes the correct location of libLTO to ld64 ··· 147 206 postInstall = '' 148 207 ln -sv $out/bin/clang $out/bin/cpp 149 208 '' 150 - + (lib.optionalString (lib.versions.major release_version == "17") '' 151 - mkdir -p $lib/lib/clang 152 - mv $lib/lib/17 $lib/lib/clang/17 153 - '') 154 209 + (lib.optionalString 155 210 ((lib.versionAtLeast release_version "19") && !(lib.versionAtLeast release_version "21")) 156 211 '' ··· 158 221 # Move libclang to 'lib' output 159 222 moveToOutput "lib/libclang.*" "$lib" 160 223 moveToOutput "lib/libclang-cpp.*" "$lib" 224 + mkdir -p $python/bin $python/share/clang/ 161 225 '' 162 - + ( 163 - if lib.versionOlder release_version "15" then 164 - '' 165 - mkdir -p $python/bin $python/share/{clang,scan-view} 166 - '' 167 - else 168 - '' 169 - mkdir -p $python/bin $python/share/clang/ 170 - '' 171 - ) 172 226 + '' 173 227 mv $out/bin/{git-clang-format,scan-view} $python/bin 174 228 if [ -e $out/bin/set-xcode-analyzer ]; then 175 229 mv $out/bin/set-xcode-analyzer $python/bin 176 230 fi 177 231 mv $out/share/clang/*.py $python/share/clang 178 - '' 179 - + (lib.optionalString (lib.versionOlder release_version "15") '' 180 - mv $out/share/scan-view/*.py $python/share/scan-view 181 - '') 182 - + '' 183 232 rm $out/bin/c-index-test 184 233 patchShebangs $python/bin 185 234 186 235 mkdir -p $dev/bin 187 236 '' 188 237 + ( 189 - if lib.versionOlder release_version "15" then 190 - '' 191 - cp bin/clang-tblgen $dev/bin 192 - '' 193 - else if lib.versionOlder release_version "20" then 238 + if lib.versionOlder release_version "20" then 194 239 '' 195 240 cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin 196 241 '' ··· 183 264 ); 184 265 185 266 env = 186 - lib.optionalAttrs 187 - ( 188 - stdenv.buildPlatform != stdenv.hostPlatform 189 - && !stdenv.hostPlatform.useLLVM 190 - && lib.versionAtLeast release_version "15" 191 - ) 267 + lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform && !stdenv.hostPlatform.useLLVM) 192 268 { 193 269 # The following warning is triggered with (at least) gcc >= 194 270 # 12, but appears to occur only for cross compiles. ··· 196 282 hardeningUnsupportedFlagsByTargetPlatform = 197 283 targetPlatform: 198 284 [ "fortify3" ] 285 + ++ lib.optional (!targetPlatform.isLinux || !targetPlatform.isx86_64) "shadowstack" 286 + ++ lib.optional (!targetPlatform.isAarch64 || !targetPlatform.isLinux) "pacret" 199 287 ++ lib.optional ( 200 - (lib.versionOlder release_version "7") || !targetPlatform.isLinux || !targetPlatform.isx86_64 201 - ) "shadowstack" 202 - ++ lib.optional ( 203 - (lib.versionOlder release_version "8") || !targetPlatform.isAarch64 || !targetPlatform.isLinux 204 - ) "pacret" 205 - ++ lib.optional ( 206 - (lib.versionOlder release_version "11") 207 - || (targetPlatform.isAarch64 && (lib.versionOlder release_version "18.1")) 208 - || (targetPlatform.isFreeBSD && (lib.versionOlder release_version "15")) 209 - || !(targetPlatform.isLinux || targetPlatform.isFreeBSD) 288 + !(targetPlatform.isLinux || targetPlatform.isFreeBSD) 210 289 || !( 211 290 targetPlatform.isx86 212 291 || targetPlatform.isPower64 ··· 207 300 || targetPlatform.isAarch64 208 301 ) 209 302 ) "stackclashprotection" 210 - ++ lib.optional ( 211 - (lib.versionOlder release_version "15") || !(targetPlatform.isx86_64 || targetPlatform.isAarch64) 212 - ) "zerocallusedregs" 213 - ++ lib.optional (lib.versionOlder release_version "15") "strictflexarrays1" 214 - ++ lib.optional (lib.versionOlder release_version "16") "strictflexarrays3" 303 + ++ lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs" 215 304 ++ (finalAttrs.passthru.hardeningUnsupportedFlags or [ ]); 216 305 }; 217 306 ··· 229 326 mainProgram = "clang"; 230 327 }; 231 328 } 232 - // lib.optionalAttrs enableManpages ( 233 - { 234 - pname = "clang-manpages"; 329 + // lib.optionalAttrs enableManpages { 330 + pname = "clang-manpages"; 235 331 236 - installPhase = '' 237 - mkdir -p $out/share/man/man1 238 - # Manually install clang manpage 239 - cp docs/man/*.1 $out/share/man/man1/ 240 - ''; 332 + ninjaFlags = [ "docs-clang-man" ]; 241 333 242 - outputs = [ "out" ]; 334 + installPhase = '' 335 + mkdir -p $out/share/man/man1 336 + # Manually install clang manpage 337 + cp docs/man/*.1 $out/share/man/man1/ 338 + ''; 243 339 244 - doCheck = false; 340 + outputs = [ "out" ]; 245 341 246 - meta = llvm_meta // { 247 - description = "man page for Clang ${version}"; 248 - }; 249 - } 250 - // ( 251 - if lib.versionOlder release_version "15" then 252 - { 253 - buildPhase = '' 254 - make docs-clang-man 255 - ''; 256 - } 257 - else 258 - { 259 - ninjaFlags = [ "docs-clang-man" ]; 260 - } 261 - ) 262 - ) 342 + doCheck = false; 343 + 344 + meta = llvm_meta // { 345 + description = "man page for Clang ${version}"; 346 + }; 347 + } 263 348 )
+3 -3
pkgs/development/compilers/llvm/common/common-let.nix
··· 31 31 ++ lib.platforms.s390x 32 32 ++ lib.platforms.wasi 33 33 ++ lib.platforms.x86 34 - ++ lib.optionals (lib.versionAtLeast release_version "7") lib.platforms.riscv 35 - ++ lib.optionals (lib.versionAtLeast release_version "14") lib.platforms.m68k 36 - ++ lib.optionals (lib.versionAtLeast release_version "16") lib.platforms.loongarch64; 34 + ++ lib.platforms.riscv 35 + ++ lib.platforms.m68k 36 + ++ lib.platforms.loongarch64; 37 37 }; 38 38 39 39 releaseInfo =
-75
pkgs/development/compilers/llvm/common/compiler-rt/armv6-mcr-dmb.patch
··· 1 - From a11d1cc41c725ec6dee58f75e4a852a658dd7543 Mon Sep 17 00:00:00 2001 2 - From: Khem Raj <raj.khem@gmail.com> 3 - Date: Thu, 10 Mar 2022 19:30:00 -0800 4 - Subject: [PATCH] [builtins] Use mcr for dmb instruction on armv6 5 - 6 - At present compiler-rt cross compiles for armv6 ( -march=armv6 ) but includes 7 - dmb instructions which are only available in armv7+ this causes SIGILL on 8 - clang+compiler-rt compiled components on rpi0w platforms. 9 - 10 - Reviewed By: MaskRay 11 - 12 - Differential Revision: https://reviews.llvm.org/D99282 13 - --- 14 - compiler-rt/lib/builtins/arm/sync-ops.h | 8 ++++---- 15 - compiler-rt/lib/builtins/assembly.h | 8 ++++++++ 16 - 2 files changed, 12 insertions(+), 4 deletions(-) 17 - 18 - diff --git a/lib/builtins/arm/sync-ops.h b/lib/builtins/arm/sync-ops.h 19 - index c9623249e5d20..7a26170741ad2 100644 20 - --- a/lib/builtins/arm/sync-ops.h 21 - +++ b/lib/builtins/arm/sync-ops.h 22 - @@ -19,14 +19,14 @@ 23 - .thumb; \ 24 - .syntax unified; \ 25 - DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ 26 - - dmb; \ 27 - + DMB; \ 28 - mov r12, r0; \ 29 - LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12]; \ 30 - op(r2, r0, r1); \ 31 - strex r3, r2, [r12]; \ 32 - cmp r3, #0; \ 33 - bne LOCAL_LABEL(tryatomic_##op); \ 34 - - dmb; \ 35 - + DMB; \ 36 - bx lr 37 - 38 - #define SYNC_OP_8(op) \ 39 - @@ -35,14 +35,14 @@ 40 - .syntax unified; \ 41 - DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ 42 - push {r4, r5, r6, lr}; \ 43 - - dmb; \ 44 - + DMB; \ 45 - mov r12, r0; \ 46 - LOCAL_LABEL(tryatomic_##op) : ldrexd r0, r1, [r12]; \ 47 - op(r4, r5, r0, r1, r2, r3); \ 48 - strexd r6, r4, r5, [r12]; \ 49 - cmp r6, #0; \ 50 - bne LOCAL_LABEL(tryatomic_##op); \ 51 - - dmb; \ 52 - + DMB; \ 53 - pop { r4, r5, r6, pc } 54 - 55 - #define MINMAX_4(rD, rN, rM, cmp_kind) \ 56 - diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h 57 - index 69a3d8620f924..06aa18162e3b4 100644 58 - --- a/lib/builtins/assembly.h 59 - +++ b/lib/builtins/assembly.h 60 - @@ -189,6 +189,14 @@ 61 - JMP(ip) 62 - #endif 63 - 64 - +#if __ARM_ARCH >= 7 65 - +#define DMB dmb 66 - +#elif __ARM_ARCH >= 6 67 - +#define DMB mcr p15, #0, r0, c7, c10, #5 68 - +#else 69 - +#error only supported on ARMv6+ 70 - +#endif 71 - + 72 - #if defined(USE_THUMB_2) 73 - #define WIDE(op) op.w 74 - #else 75 -
-34
pkgs/development/compilers/llvm/common/compiler-rt/armv6-scudo-no-yield.patch
··· 1 - From ff0b373b959165477f45d9f5f9a8da471ae111ab Mon Sep 17 00:00:00 2001 2 - From: Ben Wolsieffer <benwolsieffer@gmail.com> 3 - Date: Wed, 7 Dec 2022 18:03:56 -0500 4 - Subject: [PATCH] [scudo][standalone] Only use yield on ARMv6K and newer 5 - 6 - The yield instruction is only available in ARMv6K and newer. It behaves as a 7 - nop on single threaded platforms anyway, so use nop instead on unsupported 8 - architectures. 9 - 10 - Differential Revision: https://reviews.llvm.org/D139600 11 - --- 12 - compiler-rt/lib/scudo/standalone/common.h | 5 +++++ 13 - 1 file changed, 5 insertions(+) 14 - 15 - diff --git a/lib/scudo/standalone/common.h b/lib/scudo/standalone/common.h 16 - index bc3dfec6dbba..862cda1d4bc4 100644 17 - --- a/lib/scudo/standalone/common.h 18 - +++ b/lib/scudo/standalone/common.h 19 - @@ -109,7 +109,12 @@ inline void yieldProcessor(u8 Count) { 20 - #elif defined(__aarch64__) || defined(__arm__) 21 - __asm__ __volatile__("" ::: "memory"); 22 - for (u8 I = 0; I < Count; I++) 23 - +#if __ARM_ARCH >= 6 && !defined(__ARM_ARCH_6__) 24 - + // yield is supported on ARMv6K and newer 25 - __asm__ __volatile__("yield"); 26 - +#else 27 - + __asm__ __volatile__("nop"); 28 - +#endif 29 - #endif 30 - __asm__ __volatile__("" ::: "memory"); 31 - } 32 - -- 33 - 2.38.1 34 -
-52
pkgs/development/compilers/llvm/common/compiler-rt/armv6-sync-ops-no-thumb.patch
··· 1 - From 5017de8ba4b1fe985169cf54590e858a9019a91f Mon Sep 17 00:00:00 2001 2 - From: Khem Raj <raj.khem@gmail.com> 3 - Date: Fri, 11 Mar 2022 16:25:49 -0800 4 - Subject: [PATCH] [builtins] Do not force thumb mode directive in 5 - arm/sync-ops.h 6 - 7 - .thumb_func was not switching mode until [1] 8 - so it did not show up but now that .thumb_func (without argument) is 9 - switching mode, its causing build failures on armv6 ( rpi0 ) even when 10 - build is explicitly asking for this file to be built with -marm (ARM 11 - mode), therefore use DEFINE_COMPILERRT_FUNCTION macro to add function 12 - header which considers arch and mode from compiler cmdline to decide if 13 - the function is built using thumb mode or arm mode. 14 - 15 - [1] https://reviews.llvm.org/D101975 16 - 17 - Note that it also needs https://reviews.llvm.org/D99282 18 - 19 - Reviewed By: peter.smith, MaskRay 20 - 21 - Differential Revision: https://reviews.llvm.org/D104183 22 - --- 23 - compiler-rt/lib/builtins/arm/sync-ops.h | 6 ++---- 24 - 1 file changed, 2 insertions(+), 4 deletions(-) 25 - 26 - diff --git a/lib/builtins/arm/sync-ops.h b/lib/builtins/arm/sync-ops.h 27 - index 7a26170741ad2..d914f9d3a1093 100644 28 - --- a/lib/builtins/arm/sync-ops.h 29 - +++ b/lib/builtins/arm/sync-ops.h 30 - @@ -16,9 +16,8 @@ 31 - 32 - #define SYNC_OP_4(op) \ 33 - .p2align 2; \ 34 - - .thumb; \ 35 - .syntax unified; \ 36 - - DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ 37 - + DEFINE_COMPILERRT_FUNCTION(__sync_fetch_and_##op) \ 38 - DMB; \ 39 - mov r12, r0; \ 40 - LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12]; \ 41 - @@ -31,9 +30,8 @@ 42 - 43 - #define SYNC_OP_8(op) \ 44 - .p2align 2; \ 45 - - .thumb; \ 46 - .syntax unified; \ 47 - - DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \ 48 - + DEFINE_COMPILERRT_FUNCTION(__sync_fetch_and_##op) \ 49 - push {r4, r5, r6, lr}; \ 50 - DMB; \ 51 - mov r12, r0; \ 52 -
-32
pkgs/development/compilers/llvm/common/compiler-rt/armv7l-15.patch
··· 1 - diff -ur a/cmake/builtin-config-ix.cmake b/cmake/builtin-config-ix.cmake 2 - --- a/cmake/builtin-config-ix.cmake @llvm 15.0.6 3 - +++ b/cmake/builtin-config-ix.cmake 4 - @@ -46,7 +46,7 @@ 5 - 6 - set(ARM64 aarch64) 7 - -set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv8m.main armv8.1m.main) 8 - +set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l armv8m.main armv8.1m.main) 9 - set(AVR avr) 10 - set(HEXAGON hexagon) 11 - set(X86 i386) 12 - set(X86_64 x86_64) 13 - diff -ur a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt 14 - --- a/lib/builtins/CMakeLists.txt @llvm 15.0.6 15 - +++ b/lib/builtins/CMakeLists.txt 16 - @@ -565,6 +565,7 @@ 17 - set(armv7_SOURCES ${arm_SOURCES}) 18 - set(armv7s_SOURCES ${arm_SOURCES}) 19 - set(armv7k_SOURCES ${arm_SOURCES}) 20 - +set(armv7l_SOURCES ${arm_SOURCES}) 21 - set(arm64_SOURCES ${aarch64_SOURCES}) 22 - 23 - # macho_embedded archs 24 - @@ -734,7 +735,7 @@ 25 - foreach (arch ${BUILTIN_SUPPORTED_ARCH}) 26 - if (CAN_TARGET_${arch}) 27 - # For ARM archs, exclude any VFP builtins if VFP is not supported 28 - - if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em|armv8m.main|armv8.1m.main)$") 29 - + if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em|armv8m.main|armv8.1m.main)$") 30 - string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}") 31 - check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP) 32 - if(NOT COMPILER_RT_HAS_${arch}_VFP)
+28 -100
pkgs/development/compilers/llvm/common/compiler-rt/default.nix
··· 41 41 # TODO: Make this account for GCC having libstdcxx, which will help 42 42 # use clean up the `cmakeFlags` rats nest below. 43 43 haveLibcxx = stdenv.cc.libcxx != null; 44 - isDarwinStatic = 45 - stdenv.hostPlatform.isDarwin 46 - && stdenv.hostPlatform.isStatic 47 - && lib.versionAtLeast release_version "16"; 44 + isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic; 48 45 inherit (stdenv.hostPlatform) isMusl isAarch64 isWindows; 49 46 noSanitizers = !haveLibc || bareMetal || isMusl || isDarwinStatic || isWindows; 50 47 in ··· 55 58 runCommand "compiler-rt-src-${version}" { inherit (monorepoSrc) passthru; } ( 56 59 '' 57 60 mkdir -p "$out" 58 - '' 59 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 60 61 cp -r ${monorepoSrc}/cmake "$out" 61 62 '' 62 63 + lib.optionalString (lib.versionAtLeast release_version "21") '' ··· 69 74 70 75 sourceRoot = "${finalAttrs.src.name}/compiler-rt"; 71 76 72 - patches = 73 - lib.optional (lib.versionOlder release_version "15") (getVersionFile "compiler-rt/codesign.patch") # Revert compiler-rt commit that makes codesign mandatory 74 - ++ [ 75 - (getVersionFile "compiler-rt/X86-support-extension.patch") # Add support for i486 i586 i686 by reusing i386 config 76 - # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the 77 - # extra `/`. 78 - (getVersionFile "compiler-rt/normalize-var.patch") 79 - # Fix build on armv6l 80 - ./armv6-no-ldrexd-strexd.patch 81 - ] 82 - ++ lib.optional (lib.versions.major release_version == "12") (fetchpatch { 83 - # fixes the parallel build on aarch64 darwin 84 - name = "fix-symlink-race-aarch64-darwin.patch"; 85 - url = "https://github.com/llvm/llvm-project/commit/b31080c596246bc26d2493cfd5e07f053cf9541c.patch"; 86 - relative = "compiler-rt"; 87 - hash = "sha256-Cv2NC8402yU7QaTR6TzdH+qyWRy+tTote7KKWtKRWFQ="; 88 - }) 89 - ++ lib.optional ( 90 - lib.versions.major release_version == "12" 91 - || (lib.versionAtLeast release_version "14" && lib.versionOlder release_version "18") 92 - ) (getVersionFile "compiler-rt/gnu-install-dirs.patch") 93 - ++ 94 - lib.optional (lib.versionAtLeast release_version "13" && lib.versionOlder release_version "18") 95 - (fetchpatch { 96 - name = "cfi_startproc-after-label.patch"; 97 - url = "https://github.com/llvm/llvm-project/commit/7939ce39dac0078fef7183d6198598b99c652c88.patch"; 98 - stripLen = 1; 99 - hash = "sha256-tGqXsYvUllFrPa/r/dsKVlwx5IrcJGccuR1WAtUg7/o="; 100 - }) 101 - ++ 102 - lib.optional (lib.versionAtLeast release_version "13" && lib.versionOlder release_version "18") 103 - # Prevent a compilation error on darwin 104 - (getVersionFile "compiler-rt/darwin-targetconditionals.patch") 105 - # TODO: make unconditional and remove in <15 section below. Causes rebuilds. 106 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 107 - # See: https://github.com/NixOS/nixpkgs/pull/186575 108 - ./darwin-plistbuddy-workaround.patch 109 - ] 110 - ++ 111 - lib.optional (lib.versions.major release_version == "15") 112 - # See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893 113 - ./armv7l-15.patch 114 - ++ lib.optionals (lib.versionOlder release_version "15") [ 115 - ./darwin-plistbuddy-workaround.patch 116 - (getVersionFile "compiler-rt/armv7l.patch") 117 - # Fix build on armv6l 118 - ./armv6-mcr-dmb.patch 119 - ./armv6-sync-ops-no-thumb.patch 120 - ] 121 - ++ 122 - lib.optionals (lib.versionAtLeast release_version "13" && lib.versionOlder release_version "18") 123 - [ 124 - # Fix build on armv6l 125 - ./armv6-scudo-no-yield.patch 126 - ] 127 - ++ lib.optionals (lib.versionAtLeast release_version "13") [ 128 - (getVersionFile "compiler-rt/armv6-scudo-libatomic.patch") 129 - ] 130 - ++ lib.optional (lib.versions.major release_version == "19") (fetchpatch { 131 - url = "https://github.com/llvm/llvm-project/pull/99837/commits/14ae0a660a38e1feb151928a14f35ff0f4487351.patch"; 132 - hash = "sha256-JykABCaNNhYhZQxCvKiBn54DZ5ZguksgCHnpdwWF2no="; 133 - relative = "compiler-rt"; 134 - }); 77 + patches = [ 78 + (getVersionFile "compiler-rt/X86-support-extension.patch") # Add support for i486 i586 i686 by reusing i386 config 79 + # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the 80 + # extra `/`. 81 + (getVersionFile "compiler-rt/normalize-var.patch") 82 + # Fix build on armv6l 83 + ./armv6-no-ldrexd-strexd.patch 84 + # See: https://github.com/NixOS/nixpkgs/pull/186575 85 + ./darwin-plistbuddy-workaround.patch 86 + ] 87 + ++ [ 88 + (getVersionFile "compiler-rt/armv6-scudo-libatomic.patch") 89 + ] 90 + ++ lib.optional (lib.versions.major release_version == "19") (fetchpatch { 91 + url = "https://github.com/llvm/llvm-project/pull/99837/commits/14ae0a660a38e1feb151928a14f35ff0f4487351.patch"; 92 + hash = "sha256-JykABCaNNhYhZQxCvKiBn54DZ5ZguksgCHnpdwWF2no="; 93 + relative = "compiler-rt"; 94 + }); 135 95 136 96 nativeBuildInputs = [ 137 97 cmake 138 98 python3 139 99 libllvm.dev 100 + ninja 140 101 ] 141 - ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) 142 102 ++ lib.optionals stdenv.hostPlatform.isDarwin [ jq ]; 143 103 buildInputs = 144 104 lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders ··· 131 181 (lib.cmakeFeature "SANITIZER_CXX_ABI_LIBNAME" "libcxxabi") 132 182 (lib.cmakeBool "COMPILER_RT_USE_BUILTINS_LIBRARY" true) 133 183 ] 134 - ++ 135 - lib.optionals 136 - ((!haveLibc || bareMetal || isMusl || isAarch64) && (lib.versions.major release_version == "13")) 137 - [ 138 - (lib.cmakeBool "COMPILER_RT_BUILD_LIBFUZZER" false) 139 - ] 140 184 ++ lib.optionals (useLLVM && haveLibc) [ 141 185 (lib.cmakeBool "COMPILER_RT_BUILD_SANITIZERS" true) 142 186 (lib.cmakeBool "COMPILER_RT_BUILD_PROFILE" true) ··· 165 221 (lib.cmakeFeature "COMPILER_RT_OS_DIR" "baremetal") 166 222 ] 167 223 ++ lib.optionals (stdenv.hostPlatform.isDarwin) ( 168 - lib.optionals (lib.versionAtLeast release_version "16") [ 224 + [ 169 225 (lib.cmakeFeature "CMAKE_LIPO" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}lipo") 170 226 ] 171 227 ++ lib.optionals (!haveLibcxx) [ ··· 178 234 (lib.cmakeFeature "DARWIN_osx_ARCHS" stdenv.hostPlatform.darwinArch) 179 235 (lib.cmakeFeature "DARWIN_osx_BUILTIN_ARCHS" stdenv.hostPlatform.darwinArch) 180 236 (lib.cmakeFeature "SANITIZER_MIN_OSX_VERSION" stdenv.hostPlatform.darwinMinVersion) 181 - ] 182 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 183 237 # `COMPILER_RT_DEFAULT_TARGET_ONLY` does not apply to Darwin: 184 238 # https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/base-config-ix.cmake#L153 185 239 (lib.cmakeBool "COMPILER_RT_ENABLE_IOS" false) ··· 218 276 '' 219 277 substituteInPlace lib/builtins/clear_cache.c \ 220 278 --replace-fail "#include <assert.h>" "" 221 - substituteInPlace lib/builtins/cpu_model${lib.optionalString (lib.versionAtLeast release_version "18") "/x86"}.c \ 279 + substituteInPlace lib/builtins/cpu_model/x86.c \ 222 280 --replace-fail "#include <assert.h>" "" 223 281 '' 224 282 ) 225 283 ) 226 - + 227 - lib.optionalString 228 - (lib.versionAtLeast release_version "13" && lib.versionOlder release_version "14") 229 - '' 230 - # https://github.com/llvm/llvm-project/blob/llvmorg-14.0.6/libcxx/utils/merge_archives.py 231 - # Seems to only be used in v13 though it's present in v12 and v14, and dropped in v15. 232 - substituteInPlace ../libcxx/utils/merge_archives.py \ 233 - --replace-fail "import distutils.spawn" "from shutil import which as find_executable" \ 234 - --replace-fail "distutils.spawn." "" 235 - '' 236 284 + 237 285 lib.optionalString (lib.versionAtLeast release_version "19") 238 286 # codesign in sigtool doesn't support the various options used by the build ··· 233 301 --replace-fail 'find_program(CODESIGN codesign)' "" 234 302 ''; 235 303 236 - preConfigure = 237 - lib.optionalString (lib.versionOlder release_version "16" && !haveLibc) '' 238 - cmakeFlagsArray+=(-DCMAKE_C_FLAGS="-nodefaultlibs -ffreestanding") 239 - '' 240 - + lib.optionalString stdenv.hostPlatform.isDarwin '' 241 - cmakeFlagsArray+=( 242 - "-DDARWIN_macosx_CACHED_SYSROOT=$SDKROOT" 243 - "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=$(jq -r .Version "$SDKROOT/SDKSettings.json")" 244 - ) 245 - ''; 304 + preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' 305 + cmakeFlagsArray+=( 306 + "-DDARWIN_macosx_CACHED_SYSROOT=$SDKROOT" 307 + "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=$(jq -r .Version "$SDKROOT/SDKSettings.json")" 308 + ) 309 + ''; 246 310 247 311 # Hack around weird upstream RPATH bug 248 312 postInstall =
-48
pkgs/development/compilers/llvm/common/compiler-rt/glibc.patch
··· 1 - diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2 - index 54da635..c5dc1cd 100644 3 - --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 4 - +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 5 - @@ -1158,8 +1158,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); 6 - CHECK_SIZE_AND_OFFSET(ipc_perm, gid); 7 - CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); 8 - CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); 9 - -#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) 10 - -/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ 11 - +#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) 12 - +/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit 13 - + on many architectures. */ 14 - CHECK_SIZE_AND_OFFSET(ipc_perm, mode); 15 - #endif 16 - 17 - diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h 18 - index f89a113..f6f986f 100644 19 - --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h 20 - +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h 21 - @@ -213,26 +213,13 @@ namespace __sanitizer { 22 - u64 __unused1; 23 - u64 __unused2; 24 - #elif defined(__sparc__) 25 - -#if defined(__arch64__) 26 - unsigned mode; 27 - - unsigned short __pad1; 28 - -#else 29 - - unsigned short __pad1; 30 - - unsigned short mode; 31 - unsigned short __pad2; 32 - -#endif 33 - unsigned short __seq; 34 - unsigned long long __unused1; 35 - unsigned long long __unused2; 36 - -#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) 37 - - unsigned int mode; 38 - - unsigned short __seq; 39 - - unsigned short __pad1; 40 - - unsigned long __unused1; 41 - - unsigned long __unused2; 42 - #else 43 - - unsigned short mode; 44 - - unsigned short __pad1; 45 - + unsigned int mode; 46 - unsigned short __seq; 47 - unsigned short __pad2; 48 - #if defined(__x86_64__) && !defined(_LP64)
-80
pkgs/development/compilers/llvm/common/compiler-rt/libsanitizer-no-cyclades-9.patch
··· 1 - https://github.com/llvm/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.patch 2 - https://reviews.llvm.org/D102059 3 - --- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 4 - +++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 5 - @@ -370,15 +370,6 @@ static void ioctl_table_fill() { 6 - 7 - #if SANITIZER_GLIBC 8 - // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE 9 - - _(CYGETDEFTHRESH, WRITE, sizeof(int)); 10 - - _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); 11 - - _(CYGETMON, WRITE, struct_cyclades_monitor_sz); 12 - - _(CYGETTHRESH, WRITE, sizeof(int)); 13 - - _(CYGETTIMEOUT, WRITE, sizeof(int)); 14 - - _(CYSETDEFTHRESH, NONE, 0); 15 - - _(CYSETDEFTIMEOUT, NONE, 0); 16 - - _(CYSETTHRESH, NONE, 0); 17 - - _(CYSETTIMEOUT, NONE, 0); 18 - _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); 19 - _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); 20 - _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); 21 - --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 22 - +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 23 - @@ -143,7 +143,6 @@ typedef struct user_fpregs elf_fpregset_t; 24 - # include <sys/procfs.h> 25 - #endif 26 - #include <sys/user.h> 27 - -#include <linux/cyclades.h> 28 - #include <linux/if_eql.h> 29 - #include <linux/if_plip.h> 30 - #include <linux/lp.h> 31 - @@ -460,7 +459,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); 32 - 33 - #if SANITIZER_GLIBC 34 - unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); 35 - - unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); 36 - #if EV_VERSION > (0x010000) 37 - unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); 38 - #else 39 - @@ -824,15 +822,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); 40 - #endif // SANITIZER_LINUX 41 - 42 - #if SANITIZER_LINUX && !SANITIZER_ANDROID 43 - - unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; 44 - - unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; 45 - - unsigned IOCTL_CYGETMON = CYGETMON; 46 - - unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; 47 - - unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; 48 - - unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; 49 - - unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; 50 - - unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; 51 - - unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; 52 - unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; 53 - unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; 54 - unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; 55 - --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h 56 - +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h 57 - @@ -983,7 +983,6 @@ extern unsigned struct_vt_mode_sz; 58 - 59 - #if SANITIZER_LINUX && !SANITIZER_ANDROID 60 - extern unsigned struct_ax25_parms_struct_sz; 61 - - extern unsigned struct_cyclades_monitor_sz; 62 - extern unsigned struct_input_keymap_entry_sz; 63 - extern unsigned struct_ipx_config_data_sz; 64 - extern unsigned struct_kbdiacrs_sz; 65 - @@ -1328,15 +1327,6 @@ extern unsigned IOCTL_VT_WAITACTIVE; 66 - #endif // SANITIZER_LINUX 67 - 68 - #if SANITIZER_LINUX && !SANITIZER_ANDROID 69 - - extern unsigned IOCTL_CYGETDEFTHRESH; 70 - - extern unsigned IOCTL_CYGETDEFTIMEOUT; 71 - - extern unsigned IOCTL_CYGETMON; 72 - - extern unsigned IOCTL_CYGETTHRESH; 73 - - extern unsigned IOCTL_CYGETTIMEOUT; 74 - - extern unsigned IOCTL_CYSETDEFTHRESH; 75 - - extern unsigned IOCTL_CYSETDEFTIMEOUT; 76 - - extern unsigned IOCTL_CYSETTHRESH; 77 - - extern unsigned IOCTL_CYSETTIMEOUT; 78 - extern unsigned IOCTL_EQL_EMANCIPATE; 79 - extern unsigned IOCTL_EQL_ENSLAVE; 80 - extern unsigned IOCTL_EQL_GETMASTRCFG;
+121 -233
pkgs/development/compilers/llvm/common/default.nix
··· 115 115 tools: 116 116 let 117 117 callPackage = newScope (tools // args // metadata); 118 - clangVersion = 119 - if (lib.versionOlder metadata.release_version "16") then 120 - metadata.release_version 121 - else 122 - lib.versions.major metadata.release_version; 118 + clangVersion = lib.versions.major metadata.release_version; 123 119 mkExtraBuildCommands0 = 124 120 cc: 125 121 '' ··· 171 175 # to replacements depending on the llvm outpath (e.g. the LLVMgold patch). 172 176 # So take the only patch known to be necessary. 173 177 (metadata.getVersionFile "clang/gnu-install-dirs.patch") 174 - ] 175 - ++ 176 - lib.optional (stdenv.isAarch64 && lib.versions.major metadata.release_version == "17") 177 - # Fixes llvm17 tblgen builds on aarch64. 178 - # https://github.com/llvm/llvm-project/issues/106521#issuecomment-2337175680 179 - (metadata.getVersionFile "clang/aarch64-tblgen.patch"); 178 + ]; 180 179 }; 181 180 182 181 libclang = callPackage ./clang { ··· 233 242 lib.recurseIntoAttrs { llef = callPackage ./lldb-plugins/llef.nix { }; } 234 243 ); 235 244 236 - lldb = callPackage ./lldb ( 237 - { 238 - } 239 - // lib.optionalAttrs (lib.versions.major metadata.release_version == "16") { 240 - src = callPackage ( 241 - { runCommand }: 242 - runCommand "lldb-src-${metadata.version}" { } '' 243 - mkdir -p "$out" 244 - cp -r ${monorepoSrc}/cmake "$out" 245 - cp -r ${monorepoSrc}/lldb "$out" 246 - '' 247 - ) { }; 245 + lldb = callPackage ./lldb { }; 246 + 247 + lldb-manpages = lowPrio ( 248 + tools.lldb.override { 249 + enableManpages = true; 250 + python3 = pkgs.python3; # don't use python-boot 248 251 } 249 252 ); 250 253 ··· 258 273 259 274 bintools = wrapBintoolsWith { bintools = tools.bintools-unwrapped; }; 260 275 261 - clangUseLLVM = wrapCCWith ( 262 - rec { 263 - cc = tools.clang-unwrapped; 264 - libcxx = targetLlvmLibraries.libcxx; 265 - bintools = bintools'; 266 - extraPackages = [ 267 - targetLlvmLibraries.compiler-rt 268 - ] 269 - ++ lib.optionals (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD) [ 270 - targetLlvmLibraries.libunwind 271 - ]; 272 - extraBuildCommands = 273 - lib.optionalString (lib.versions.major metadata.release_version == "13") ( 274 - '' 275 - echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags 276 - echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags 277 - '' 278 - + lib.optionalString (!stdenv.targetPlatform.isWasm) '' 279 - echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags 280 - echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags 281 - '' 282 - + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) '' 283 - echo "-lunwind" >> $out/nix-support/cc-ldflags 284 - '' 285 - + lib.optionalString stdenv.targetPlatform.isWasm '' 286 - echo "-fno-exceptions" >> $out/nix-support/cc-cflags 287 - '' 276 + clangUseLLVM = wrapCCWith rec { 277 + cc = tools.clang-unwrapped; 278 + libcxx = targetLlvmLibraries.libcxx; 279 + bintools = bintools'; 280 + extraPackages = [ 281 + targetLlvmLibraries.compiler-rt 282 + ] 283 + ++ lib.optionals (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD) [ 284 + targetLlvmLibraries.libunwind 285 + ]; 286 + extraBuildCommands = mkExtraBuildCommands cc; 287 + nixSupport.cc-cflags = [ 288 + "-rtlib=compiler-rt" 289 + "-Wno-unused-command-line-argument" 290 + "-B${targetLlvmLibraries.compiler-rt}/lib" 291 + ] 292 + ++ lib.optional ( 293 + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD 294 + ) "--unwindlib=libunwind" 295 + ++ lib.optional ( 296 + !stdenv.targetPlatform.isWasm 297 + && !stdenv.targetPlatform.isFreeBSD 298 + && stdenv.targetPlatform.useLLVM or false 299 + ) "-lunwind" 300 + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 301 + nixSupport.cc-ldflags = lib.optionals ( 302 + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD 303 + ) [ "-L${targetLlvmLibraries.libunwind}/lib" ]; 304 + }; 305 + 306 + clangWithLibcAndBasicRtAndLibcxx = wrapCCWith rec { 307 + cc = tools.clang-unwrapped; 308 + libcxx = targetLlvmLibraries.libcxx; 309 + bintools = bintools'; 310 + extraPackages = [ 311 + targetLlvmLibraries.compiler-rt-no-libc 312 + ] 313 + ++ 314 + lib.optionals 315 + ( 316 + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin 288 317 ) 289 - + mkExtraBuildCommands cc; 290 - } 291 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "14") { 292 - nixSupport.cc-cflags = [ 293 - "-rtlib=compiler-rt" 294 - "-Wno-unused-command-line-argument" 295 - "-B${targetLlvmLibraries.compiler-rt}/lib" 296 - ] 297 - ++ lib.optional ( 298 - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD 299 - ) "--unwindlib=libunwind" 300 - ++ lib.optional ( 301 - !stdenv.targetPlatform.isWasm 302 - && !stdenv.targetPlatform.isFreeBSD 303 - && stdenv.targetPlatform.useLLVM or false 304 - ) "-lunwind" 305 - ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 306 - nixSupport.cc-ldflags = lib.optionals ( 307 - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD 308 - ) [ "-L${targetLlvmLibraries.libunwind}/lib" ]; 309 - } 310 - ); 318 + [ 319 + targetLlvmLibraries.libunwind 320 + ]; 321 + extraBuildCommands = mkExtraBuildCommandsBasicRt cc; 322 + nixSupport.cc-cflags = [ 323 + "-rtlib=compiler-rt" 324 + "-Wno-unused-command-line-argument" 325 + "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" 326 + ] 327 + ++ lib.optional ( 328 + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin 329 + ) "--unwindlib=libunwind" 330 + ++ lib.optional ( 331 + !stdenv.targetPlatform.isWasm 332 + && !stdenv.targetPlatform.isFreeBSD 333 + && stdenv.targetPlatform.useLLVM or false 334 + ) "-lunwind" 335 + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 336 + nixSupport.cc-ldflags = lib.optionals ( 337 + !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin 338 + ) [ "-L${targetLlvmLibraries.libunwind}/lib" ]; 339 + }; 311 340 312 - clangWithLibcAndBasicRtAndLibcxx = wrapCCWith ( 313 - rec { 314 - cc = tools.clang-unwrapped; 315 - libcxx = targetLlvmLibraries.libcxx; 316 - bintools = bintools'; 317 - extraPackages = [ 318 - targetLlvmLibraries.compiler-rt-no-libc 319 - ] 320 - ++ 321 - lib.optionals 322 - ( 323 - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin 324 - ) 325 - [ 326 - targetLlvmLibraries.libunwind 327 - ]; 328 - extraBuildCommands = 329 - lib.optionalString (lib.versions.major metadata.release_version == "13") ( 330 - '' 331 - echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags 332 - echo "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" >> $out/nix-support/cc-cflags 333 - '' 334 - + lib.optionalString (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isDarwin) '' 335 - echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags 336 - echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags 337 - '' 338 - + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) '' 339 - echo "-lunwind" >> $out/nix-support/cc-ldflags 340 - '' 341 - + lib.optionalString stdenv.targetPlatform.isWasm '' 342 - echo "-fno-exceptions" >> $out/nix-support/cc-cflags 343 - '' 344 - ) 345 - + mkExtraBuildCommandsBasicRt cc; 346 - } 347 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "14") { 348 - nixSupport.cc-cflags = [ 349 - "-rtlib=compiler-rt" 350 - "-Wno-unused-command-line-argument" 351 - "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" 352 - ] 353 - ++ lib.optional ( 354 - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin 355 - ) "--unwindlib=libunwind" 356 - ++ lib.optional ( 357 - !stdenv.targetPlatform.isWasm 358 - && !stdenv.targetPlatform.isFreeBSD 359 - && stdenv.targetPlatform.useLLVM or false 360 - ) "-lunwind" 361 - ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 362 - nixSupport.cc-ldflags = lib.optionals ( 363 - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && !stdenv.targetPlatform.isDarwin 364 - ) [ "-L${targetLlvmLibraries.libunwind}/lib" ]; 365 - } 366 - ); 341 + clangWithLibcAndBasicRt = wrapCCWith rec { 342 + cc = tools.clang-unwrapped; 343 + libcxx = null; 344 + bintools = bintools'; 345 + extraPackages = [ targetLlvmLibraries.compiler-rt-no-libc ]; 346 + extraBuildCommands = mkExtraBuildCommandsBasicRt cc; 347 + nixSupport.cc-cflags = [ 348 + "-rtlib=compiler-rt" 349 + "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" 350 + "-nostdlib++" 351 + ] 352 + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 353 + }; 367 354 368 - clangWithLibcAndBasicRt = wrapCCWith ( 369 - rec { 370 - cc = tools.clang-unwrapped; 371 - libcxx = null; 372 - bintools = bintools'; 373 - extraPackages = [ targetLlvmLibraries.compiler-rt-no-libc ]; 374 - extraBuildCommands = 375 - lib.optionalString (lib.versions.major metadata.release_version == "13") '' 376 - echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags 377 - echo "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" >> $out/nix-support/cc-cflags 378 - echo "-nostdlib++" >> $out/nix-support/cc-cflags 379 - '' 380 - + mkExtraBuildCommandsBasicRt cc; 381 - } 382 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "14") { 383 - nixSupport.cc-cflags = [ 384 - "-rtlib=compiler-rt" 385 - "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" 386 - "-nostdlib++" 387 - ] 388 - ++ lib.optional ( 389 - lib.versionAtLeast metadata.release_version "15" && stdenv.targetPlatform.isWasm 390 - ) "-fno-exceptions"; 391 - } 392 - ); 355 + clangNoLibcWithBasicRt = wrapCCWith rec { 356 + cc = tools.clang-unwrapped; 357 + libcxx = null; 358 + bintools = bintoolsNoLibc'; 359 + extraPackages = [ targetLlvmLibraries.compiler-rt-no-libc ]; 360 + extraBuildCommands = mkExtraBuildCommandsBasicRt cc; 361 + nixSupport.cc-cflags = [ 362 + "-rtlib=compiler-rt" 363 + "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" 364 + ] 365 + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 366 + }; 393 367 394 - clangNoLibcWithBasicRt = wrapCCWith ( 395 - rec { 396 - cc = tools.clang-unwrapped; 397 - libcxx = null; 398 - bintools = bintoolsNoLibc'; 399 - extraPackages = [ targetLlvmLibraries.compiler-rt-no-libc ]; 400 - extraBuildCommands = 401 - lib.optionalString (lib.versions.major metadata.release_version == "13") '' 402 - echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags 403 - echo "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" >> $out/nix-support/cc-cflags 404 - '' 405 - + mkExtraBuildCommandsBasicRt cc; 406 - } 407 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "14") { 408 - nixSupport.cc-cflags = [ 409 - "-rtlib=compiler-rt" 410 - "-B${targetLlvmLibraries.compiler-rt-no-libc}/lib" 411 - ] 412 - ++ lib.optional ( 413 - lib.versionAtLeast metadata.release_version "15" && stdenv.targetPlatform.isWasm 414 - ) "-fno-exceptions"; 415 - } 416 - ); 417 - 418 - clangNoLibcNoRt = wrapCCWith ( 419 - rec { 420 - cc = tools.clang-unwrapped; 421 - libcxx = null; 422 - bintools = bintoolsNoLibc'; 423 - extraPackages = [ ]; 424 - # "-nostartfiles" used to be needed for pkgsLLVM, causes problems so don't include it. 425 - extraBuildCommands = mkExtraBuildCommands0 cc; 426 - } 427 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "14") { 428 - # "-nostartfiles" used to be needed for pkgsLLVM, causes problems so don't include it. 429 - nixSupport.cc-cflags = lib.optional ( 430 - lib.versionAtLeast metadata.release_version "15" && stdenv.targetPlatform.isWasm 431 - ) "-fno-exceptions"; 432 - } 433 - ); 368 + clangNoLibcNoRt = wrapCCWith rec { 369 + cc = tools.clang-unwrapped; 370 + libcxx = null; 371 + bintools = bintoolsNoLibc'; 372 + extraPackages = [ ]; 373 + # "-nostartfiles" used to be needed for pkgsLLVM, causes problems so don't include it. 374 + extraBuildCommands = mkExtraBuildCommands0 cc; 375 + nixSupport.cc-cflags = lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; 376 + }; 434 377 435 378 # This is an "oddly ordered" bootstrap just for Darwin. Probably 436 379 # don't want it otherwise. ··· 370 457 extraPackages = [ ]; 371 458 extraBuildCommands = mkExtraBuildCommands0 cc; 372 459 } 373 - // lib.optionalAttrs ( 374 - lib.versionAtLeast metadata.release_version "15" && stdenv.targetPlatform.isWasm 375 - ) { nixSupport.cc-cflags = [ "-fno-exceptions" ]; }; 460 + # FIXME: This should be inside the `wrapCCWith` call. 461 + // lib.optionalAttrs stdenv.targetPlatform.isWasm { 462 + nixSupport.cc-cflags = [ "-fno-exceptions" ]; 463 + }; 376 464 377 465 # Aliases 378 466 clangNoCompilerRt = tools.clangNoLibcNoRt; 379 467 clangNoLibc = tools.clangNoLibcWithBasicRt; 380 468 clangNoLibcxx = tools.clangWithLibcAndBasicRt; 381 - } 382 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "15") { 383 - # TODO: pre-15: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins' 384 - lldb-manpages = lowPrio ( 385 - tools.lldb.override { 386 - enableManpages = true; 387 - python3 = pkgs.python3; # don't use python-boot 388 - } 389 - ); 390 - } 391 - // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "16") { 469 + 392 470 mlir = callPackage ./mlir { }; 393 471 } 394 472 // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "19") { 395 473 bolt = callPackage ./bolt { 396 474 }; 397 475 } 398 - // 399 - lib.optionalAttrs 400 - (lib.versionAtLeast metadata.release_version "16" && lib.versionOlder metadata.release_version "22") 401 - { 402 - libclc = callPackage ./libclc { }; 403 - } 476 + // lib.optionalAttrs (lib.versionOlder metadata.release_version "22") { 477 + libclc = callPackage ./libclc { }; 478 + } 404 479 // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "20") { 405 480 flang = callPackage ./flang { 406 481 mlir = tools.mlir; ··· 399 498 libraries = lib.makeExtensible ( 400 499 libraries: 401 500 let 402 - callPackage = newScope ( 403 - libraries 404 - // buildLlvmTools 405 - // args 406 - // metadata 407 - # Previously monorepoSrc was erroneously not being passed through. 408 - // lib.optionalAttrs (lib.versionOlder metadata.release_version "14") { monorepoSrc = null; } # Preserve a bug during #307211, TODO: remove; causes llvm 13 rebuild. 409 - ); 501 + callPackage = newScope (libraries // buildLlvmTools // args // metadata); 410 502 in 411 503 ( 412 504 { ··· 455 561 456 562 libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang; 457 563 458 - libcxx = callPackage ./libcxx ( 459 - { 460 - stdenv = 461 - if stdenv.hostPlatform.isDarwin then 462 - overrideCC darwin.bootstrapStdenv buildLlvmTools.clangWithLibcAndBasicRt 463 - else 464 - overrideCC stdenv buildLlvmTools.clangWithLibcAndBasicRt; 465 - } 466 - // lib.optionalAttrs (lib.versionOlder metadata.release_version "14") { 467 - # TODO: remove this, causes LLVM 13 packages rebuild. 468 - inherit (metadata) monorepoSrc; # Preserve bug during #307211 refactor. 469 - } 470 - ); 564 + libcxx = callPackage ./libcxx { 565 + stdenv = 566 + if stdenv.hostPlatform.isDarwin then 567 + overrideCC darwin.bootstrapStdenv buildLlvmTools.clangWithLibcAndBasicRt 568 + else 569 + overrideCC stdenv buildLlvmTools.clangWithLibcAndBasicRt; 570 + }; 471 571 472 572 libunwind = callPackage ./libunwind { 473 573 stdenv = overrideCC stdenv buildLlvmTools.clangWithLibcAndBasicRt;
+1 -1
pkgs/development/compilers/llvm/common/libc/default.nix
··· 42 42 nativeBuildInputs = [ 43 43 cmake 44 44 python3 45 + ninja 45 46 ] 46 - ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) 47 47 ++ (lib.optional isFullBuild python3Packages.pyyaml); 48 48 49 49 buildInputs = lib.optional isFullBuild linuxHeaders;
+5 -11
pkgs/development/compilers/llvm/common/libclc/default.nix
··· 30 30 pname = "libclc"; 31 31 inherit version; 32 32 33 - src = runCommand "libclc-src-${version}" { inherit (monorepoSrc) passthru; } ( 34 - '' 35 - mkdir -p "$out" 36 - '' 37 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 38 - cp -r ${monorepoSrc}/cmake "$out" 39 - '' 40 - + '' 41 - cp -r ${monorepoSrc}/libclc "$out" 42 - '' 43 - ); 33 + src = runCommand "libclc-src-${version}" { inherit (monorepoSrc) passthru; } ('' 34 + mkdir -p "$out" 35 + cp -r ${monorepoSrc}/cmake "$out" 36 + cp -r ${monorepoSrc}/libclc "$out" 37 + ''); 44 38 45 39 sourceRoot = "${finalAttrs.src.name}/libclc"; 46 40
+128 -209
pkgs/development/compilers/llvm/common/libcxx/default.nix
··· 33 33 # Note: useLLVM is likely false for Darwin but true under pkgsLLVM 34 34 useLLVM = stdenv.hostPlatform.useLLVM or false; 35 35 36 - cxxabiCMakeFlags = 37 - lib.optionals (lib.versionAtLeast release_version "18") [ 38 - (lib.cmakeBool "LIBCXXABI_USE_LLVM_UNWINDER" false) 39 - ] 40 - ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) ( 41 - if lib.versionAtLeast release_version "18" then 42 - [ 43 - (lib.cmakeFeature "LIBCXXABI_ADDITIONAL_LIBRARIES" "unwind") 44 - (lib.cmakeBool "LIBCXXABI_USE_COMPILER_RT" true) 45 - ] 46 - else 47 - [ 48 - (lib.cmakeBool "LIBCXXABI_USE_COMPILER_RT" true) 49 - (lib.cmakeBool "LIBCXXABI_USE_LLVM_UNWINDER" true) 50 - ] 51 - ) 52 - ++ lib.optionals stdenv.hostPlatform.isWasm [ 53 - (lib.cmakeBool "LIBCXXABI_ENABLE_THREADS" false) 54 - (lib.cmakeBool "LIBCXXABI_ENABLE_EXCEPTIONS" false) 55 - ] 56 - ++ lib.optionals (!enableShared || stdenv.hostPlatform.isWindows) [ 57 - # Required on Windows due to https://github.com/llvm/llvm-project/issues/55245 58 - (lib.cmakeBool "LIBCXXABI_ENABLE_SHARED" false) 59 - ]; 36 + cxxabiCMakeFlags = [ 37 + (lib.cmakeBool "LIBCXXABI_USE_LLVM_UNWINDER" false) 38 + ] 39 + ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) [ 40 + (lib.cmakeFeature "LIBCXXABI_ADDITIONAL_LIBRARIES" "unwind") 41 + (lib.cmakeBool "LIBCXXABI_USE_COMPILER_RT" true) 42 + ] 43 + ++ lib.optionals stdenv.hostPlatform.isWasm [ 44 + (lib.cmakeBool "LIBCXXABI_ENABLE_THREADS" false) 45 + (lib.cmakeBool "LIBCXXABI_ENABLE_EXCEPTIONS" false) 46 + ] 47 + ++ lib.optionals (!enableShared || stdenv.hostPlatform.isWindows) [ 48 + # Required on Windows due to https://github.com/llvm/llvm-project/issues/55245 49 + (lib.cmakeBool "LIBCXXABI_ENABLE_SHARED" false) 50 + ]; 60 51 61 52 cxxCMakeFlags = [ 62 53 (lib.cmakeFeature "LIBCXX_CXX_ABI" cxxabiName) ··· 55 64 # https://github.com/llvm/llvm-project/issues/55245 56 65 (lib.cmakeBool "LIBCXX_ENABLE_STATIC_ABI_LIBRARY" stdenv.hostPlatform.isWindows) 57 66 ] 58 - ++ lib.optionals (cxxabi == null && lib.versionAtLeast release_version "16") [ 59 - # Note: llvm < 16 doesn't support this flag (or it's broken); handled in postInstall instead. 67 + ++ lib.optionals (cxxabi == null) [ 60 68 # Include libc++abi symbols within libc++.a for static linking libc++; 61 69 # dynamic linking includes them through libc++.so being a linker script 62 70 # which includes both shared objects. ··· 68 78 (lib.cmakeFeature "LIBCXX_HAS_MUSL_LIBC" "1") 69 79 ] 70 80 ++ 71 - lib.optionals 72 - ( 73 - lib.versionAtLeast release_version "18" 74 - && !useLLVM 75 - && stdenv.hostPlatform.libc == "glibc" 76 - && !stdenv.hostPlatform.isStatic 77 - ) 81 + lib.optionals (!useLLVM && stdenv.hostPlatform.libc == "glibc" && !stdenv.hostPlatform.isStatic) 78 82 [ 79 83 (lib.cmakeFeature "LIBCXX_ADDITIONAL_LIBRARIES" "gcc_s") 80 84 ] 81 - ++ lib.optionals (lib.versionAtLeast release_version "18" && stdenv.hostPlatform.isFreeBSD) [ 85 + ++ lib.optionals stdenv.hostPlatform.isFreeBSD [ 82 86 # Name and documentation claim this is for libc++abi, but its man effect is adding `-lunwind` 83 87 # to the libc++.so linker script. We want FreeBSD's so-called libgcc instead of libunwind. 84 88 (lib.cmakeBool "LIBCXXABI_USE_LLVM_UNWINDER" false) ··· 80 96 ++ lib.optionals useLLVM [ 81 97 (lib.cmakeBool "LIBCXX_USE_COMPILER_RT" true) 82 98 ] 83 - ++ 84 - lib.optionals (useLLVM && !stdenv.hostPlatform.isFreeBSD && lib.versionAtLeast release_version "16") 85 - [ 86 - (lib.cmakeFeature "LIBCXX_ADDITIONAL_LIBRARIES" "unwind") 87 - ] 99 + ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isFreeBSD) [ 100 + (lib.cmakeFeature "LIBCXX_ADDITIONAL_LIBRARIES" "unwind") 101 + ] 88 102 ++ lib.optionals stdenv.hostPlatform.isWasm [ 89 103 (lib.cmakeBool "LIBCXX_ENABLE_THREADS" false) 90 104 (lib.cmakeBool "LIBCXX_ENABLE_FILESYSTEM" false) ··· 95 113 cmakeFlags = [ 96 114 (lib.cmakeFeature "LLVM_ENABLE_RUNTIMES" (lib.concatStringsSep ";" runtimes)) 97 115 ] 98 - ++ 99 - lib.optionals 100 - ( 101 - stdenv.hostPlatform.isWasm 102 - || (lib.versions.major release_version == "12" && stdenv.hostPlatform.isDarwin) 103 - ) 104 - [ 105 - (lib.cmakeBool "CMAKE_CXX_COMPILER_WORKS" true) 106 - ] 107 116 ++ lib.optionals stdenv.hostPlatform.isWasm [ 117 + (lib.cmakeBool "CMAKE_CXX_COMPILER_WORKS" true) 108 118 (lib.cmakeBool "CMAKE_C_COMPILER_WORKS" true) 109 119 (lib.cmakeBool "UNIX" true) # Required otherwise libc++ fails to detect the correct linker 110 120 ] ··· 106 132 107 133 in 108 134 109 - stdenv.mkDerivation ( 110 - finalAttrs: 111 - { 112 - pname = "libcxx"; 113 - inherit version cmakeFlags; 135 + stdenv.mkDerivation (finalAttrs: { 136 + pname = "libcxx"; 137 + inherit version cmakeFlags; 114 138 115 - src = 116 - if monorepoSrc != null then 117 - runCommand "libcxx-src-${version}" { inherit (monorepoSrc) passthru; } ( 118 - '' 119 - mkdir -p "$out/llvm" 120 - '' 121 - + (lib.optionalString (lib.versionAtLeast release_version "14") '' 122 - cp -r ${monorepoSrc}/cmake "$out" 123 - '') 124 - + '' 125 - cp -r ${monorepoSrc}/libcxx "$out" 126 - cp -r ${monorepoSrc}/llvm/cmake "$out/llvm" 127 - cp -r ${monorepoSrc}/llvm/utils "$out/llvm" 128 - '' 129 - + (lib.optionalString (lib.versionAtLeast release_version "14") '' 130 - cp -r ${monorepoSrc}/third-party "$out" 131 - '') 132 - + (lib.optionalString (lib.versionAtLeast release_version "20") '' 133 - cp -r ${monorepoSrc}/libc "$out" 134 - '') 135 - + '' 136 - cp -r ${monorepoSrc}/runtimes "$out" 137 - '' 138 - + (lib.optionalString (cxxabi == null) '' 139 - cp -r ${monorepoSrc}/libcxxabi "$out" 140 - '') 141 - ) 142 - else 143 - src; 139 + src = 140 + if monorepoSrc != null then 141 + runCommand "libcxx-src-${version}" { inherit (monorepoSrc) passthru; } ( 142 + '' 143 + mkdir -p "$out/llvm" 144 + cp -r ${monorepoSrc}/cmake "$out" 145 + cp -r ${monorepoSrc}/libcxx "$out" 146 + cp -r ${monorepoSrc}/llvm/cmake "$out/llvm" 147 + cp -r ${monorepoSrc}/llvm/utils "$out/llvm" 148 + cp -r ${monorepoSrc}/third-party "$out" 149 + '' 150 + + (lib.optionalString (lib.versionAtLeast release_version "20") '' 151 + cp -r ${monorepoSrc}/libc "$out" 152 + '') 153 + + '' 154 + cp -r ${monorepoSrc}/runtimes "$out" 155 + '' 156 + + (lib.optionalString (cxxabi == null) '' 157 + cp -r ${monorepoSrc}/libcxxabi "$out" 158 + '') 159 + ) 160 + else 161 + src; 144 162 145 - outputs = [ 146 - "out" 147 - "dev" 148 - ]; 163 + outputs = [ 164 + "out" 165 + "dev" 166 + ]; 149 167 150 - preConfigure = lib.optionalString stdenv.hostPlatform.isMusl '' 151 - patchShebangs utils/cat_files.py 168 + preConfigure = lib.optionalString stdenv.hostPlatform.isMusl '' 169 + patchShebangs utils/cat_files.py 170 + ''; 171 + 172 + # TODO: Remove on `staging`. 173 + patches = [ ]; 174 + 175 + nativeBuildInputs = [ 176 + cmake 177 + ninja 178 + python3 179 + ] 180 + ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames 181 + ++ lib.optional (cxxabi != null) lndir; 182 + 183 + buildInputs = [ 184 + cxxabi 185 + ] 186 + ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm && !stdenv.hostPlatform.isFreeBSD) [ 187 + libunwind 188 + ]; 189 + 190 + # TODO: Possibly move back to `sourceRoot` on `staging`? 191 + postPatch = '' 192 + cd runtimes 193 + ''; 194 + 195 + # libc++.so is a linker script which expands to multiple libraries, 196 + # libc++.so.1 and libc++abi.so or the external cxxabi. ld-wrapper doesn't 197 + # support linker scripts so the external cxxabi needs to be symlinked in 198 + postInstall = 199 + lib.optionalString (cxxabi != null) '' 200 + lndir ${lib.getDev cxxabi}/include $dev/include/c++/v1 201 + lndir ${lib.getLib cxxabi}/lib $out/lib 202 + libcxxabi=$out/lib/lib${cxxabi.libName}.a 203 + '' 204 + # LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON doesn't work for 205 + # external cxxabi libraries so merge libc++abi.a into libc++.a ourselves. 206 + 207 + # GNU binutils emits objects in LIFO order in MRI scripts so after the merge 208 + # the objects are in reversed order so a second MRI script is required so the 209 + # objects in the archive are listed in proper order (libc++.a, libc++abi.a) 210 + + lib.optionalString (cxxabi != null) '' 211 + libcxxabi=''${libcxxabi-$out/lib/libc++abi.a} 212 + if [[ -f $out/lib/libc++.a && -e $libcxxabi ]]; then 213 + $AR -M <<MRI 214 + create $out/lib/libc++.a 215 + addlib $out/lib/libc++.a 216 + addlib $libcxxabi 217 + save 218 + end 219 + MRI 220 + $AR -M <<MRI 221 + create $out/lib/libc++.a 222 + addlib $out/lib/libc++.a 223 + save 224 + end 225 + MRI 226 + fi 152 227 ''; 153 228 154 - patches = lib.optionals (lib.versionOlder release_version "16") ( 155 - lib.optional (lib.versions.major release_version == "15") 156 - # See: 157 - # - https://reviews.llvm.org/D133566 158 - # - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432 159 - # !!! Drop in LLVM 16+ 160 - ( 161 - fetchpatch { 162 - url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch"; 163 - hash = "sha256-B07vHmSjy5BhhkGSj3e1E0XmMv5/9+mvC/k70Z29VwY="; 164 - } 165 - ) 166 - ++ [ 167 - (substitute { 168 - src = ../libcxxabi/wasm.patch; 169 - substitutions = [ 170 - "--replace-fail" 171 - "/cmake/" 172 - "/llvm/cmake/" 173 - ]; 174 - }) 175 - ] 176 - ++ lib.optional stdenv.hostPlatform.isMusl (substitute { 177 - src = ./libcxx-0001-musl-hacks.patch; 178 - substitutions = [ 179 - "--replace-fail" 180 - "/include/" 181 - "/libcxx/include/" 182 - ]; 183 - }) 184 - ); 229 + passthru = { 230 + isLLVM = true; 231 + }; 185 232 186 - nativeBuildInputs = [ 187 - cmake 188 - ninja 189 - python3 190 - ] 191 - ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames 192 - ++ lib.optional (cxxabi != null) lndir; 193 - 194 - buildInputs = [ 195 - cxxabi 196 - ] 197 - ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm && !stdenv.hostPlatform.isFreeBSD) [ 198 - libunwind 233 + meta = llvm_meta // { 234 + homepage = "https://libcxx.llvm.org/"; 235 + description = "C++ standard library"; 236 + longDescription = '' 237 + libc++ is an implementation of the C++ standard library, targeting C++11, 238 + C++14 and above. 239 + ''; 240 + # "All of the code in libc++ is dual licensed under the MIT license and the 241 + # UIUC License (a BSD-like license)": 242 + license = with lib.licenses; [ 243 + mit 244 + ncsa 199 245 ]; 200 - 201 - # libc++.so is a linker script which expands to multiple libraries, 202 - # libc++.so.1 and libc++abi.so or the external cxxabi. ld-wrapper doesn't 203 - # support linker scripts so the external cxxabi needs to be symlinked in 204 - postInstall = 205 - lib.optionalString (cxxabi != null) '' 206 - lndir ${lib.getDev cxxabi}/include $dev/include/c++/v1 207 - lndir ${lib.getLib cxxabi}/lib $out/lib 208 - libcxxabi=$out/lib/lib${cxxabi.libName}.a 209 - '' 210 - # LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON doesn't work for LLVM < 16 or 211 - # external cxxabi libraries so merge libc++abi.a into libc++.a ourselves. 212 - 213 - # GNU binutils emits objects in LIFO order in MRI scripts so after the merge 214 - # the objects are in reversed order so a second MRI script is required so the 215 - # objects in the archive are listed in proper order (libc++.a, libc++abi.a) 216 - + lib.optionalString (cxxabi != null || lib.versionOlder release_version "16") '' 217 - libcxxabi=''${libcxxabi-$out/lib/libc++abi.a} 218 - if [[ -f $out/lib/libc++.a && -e $libcxxabi ]]; then 219 - $AR -M <<MRI 220 - create $out/lib/libc++.a 221 - addlib $out/lib/libc++.a 222 - addlib $libcxxabi 223 - save 224 - end 225 - MRI 226 - $AR -M <<MRI 227 - create $out/lib/libc++.a 228 - addlib $out/lib/libc++.a 229 - save 230 - end 231 - MRI 232 - fi 233 - ''; 234 - 235 - passthru = { 236 - isLLVM = true; 237 - }; 238 - 239 - meta = llvm_meta // { 240 - homepage = "https://libcxx.llvm.org/"; 241 - description = "C++ standard library"; 242 - longDescription = '' 243 - libc++ is an implementation of the C++ standard library, targeting C++11, 244 - C++14 and above. 245 - ''; 246 - # "All of the code in libc++ is dual licensed under the MIT license and the 247 - # UIUC License (a BSD-like license)": 248 - license = with lib.licenses; [ 249 - mit 250 - ncsa 251 - ]; 252 - }; 253 - } 254 - // ( 255 - if (lib.versionOlder release_version "16" || lib.versionAtLeast release_version "17") then 256 - { 257 - postPatch = 258 - (lib.optionalString 259 - (lib.versionAtLeast release_version "14" && lib.versionOlder release_version "15") 260 - '' 261 - # fix CMake error when static and LIBCXXABI_USE_LLVM_UNWINDER=ON. aren't 262 - # building unwind so don't need to depend on it 263 - substituteInPlace libcxx/src/CMakeLists.txt \ 264 - --replace-fail "add_dependencies(cxx_static unwind)" "# add_dependencies(cxx_static unwind)" 265 - '' 266 - ) 267 - + '' 268 - cd runtimes 269 - ''; 270 - } 271 - else 272 - { 273 - sourceRoot = "${finalAttrs.src.name}/runtimes"; 274 - } 275 - ) 276 - ) 246 + }; 247 + })
-39
pkgs/development/compilers/llvm/common/libcxx/libcxx-0001-musl-hacks.patch
··· 1 - From 1c936d7fda3275265e37f93697232a1ed652390f Mon Sep 17 00:00:00 2001 2 - From: Will Dietz <w@wdtz.org> 3 - Date: Sat, 9 Jul 2016 19:22:54 -0500 4 - Subject: [PATCH] musl fixes/hacks 5 - 6 - Conflicts: 7 - 8 - include/__config 9 - include/locale 10 - src/locale.cpp 11 - --- 12 - include/locale | 4 ++-- 13 - 1 files changed, 2 insertions(+), 2 deletions(-) 14 - 15 - diff --git a/include/locale b/include/locale 16 - index 3d804e8..9b01f5b 100644 17 - --- a/include/locale 18 - +++ b/include/locale 19 - @@ -695,7 +695,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end, 20 - typename remove_reference<decltype(errno)>::type __save_errno = errno; 21 - errno = 0; 22 - char *__p2; 23 - - long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); 24 - + long long __ll = strtoll(__a, &__p2, __base); 25 - typename remove_reference<decltype(errno)>::type __current_errno = errno; 26 - if (__current_errno == 0) 27 - errno = __save_errno; 28 - @@ -735,7 +735,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end, 29 - typename remove_reference<decltype(errno)>::type __save_errno = errno; 30 - errno = 0; 31 - char *__p2; 32 - - unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); 33 - + unsigned long long __ll = strtoull(__a, &__p2, __base); 34 - typename remove_reference<decltype(errno)>::type __current_errno = errno; 35 - if (__current_errno == 0) 36 - errno = __save_errno; 37 - -- 38 - 1.7.1 39 -
-16
pkgs/development/compilers/llvm/common/libcxxabi/wasm.patch
··· 1 - diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake 2 - index 15497d405e0..33f7f18193a 100644 3 - --- a/cmake/modules/HandleLLVMOptions.cmake 4 - +++ b/cmake/modules/HandleLLVMOptions.cmake 5 - @@ -127,7 +127,10 @@ else(WIN32) 6 - set(LLVM_HAVE_LINK_VERSION_SCRIPT 1) 7 - endif() 8 - else(FUCHSIA OR UNIX) 9 - - MESSAGE(SEND_ERROR "Unable to determine platform") 10 - + if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi") 11 - + else() 12 - + MESSAGE(SEND_ERROR "Unable to determine platform") 13 - + endif() 14 - endif(FUCHSIA OR UNIX) 15 - endif(WIN32) 16 -
+72 -109
pkgs/development/compilers/llvm/common/libunwind/default.nix
··· 16 16 devExtraCmakeFlags ? [ ], 17 17 getVersionFile, 18 18 }: 19 - stdenv.mkDerivation ( 20 - finalAttrs: 21 - let 22 - hasPatches = builtins.length finalAttrs.patches > 0; 23 - in 24 - { 25 - pname = "libunwind"; 19 + stdenv.mkDerivation (finalAttrs: { 20 + pname = "libunwind"; 26 21 27 - inherit version; 22 + inherit version; 28 23 29 - patches = lib.optional (lib.versionOlder release_version "17") ( 30 - getVersionFile "libunwind/gnu-install-dirs.patch" 31 - ); 24 + # TODO: Remove on `staging`. 25 + patches = [ ]; 32 26 33 - src = 34 - if monorepoSrc != null then 35 - runCommand "libunwind-src-${version}" { inherit (monorepoSrc) passthru; } ( 36 - '' 37 - mkdir -p "$out" 38 - '' 39 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 40 - cp -r ${monorepoSrc}/cmake "$out" 41 - '' 42 - + '' 43 - cp -r ${monorepoSrc}/libunwind "$out" 44 - mkdir -p "$out/libcxx" 45 - cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx" 46 - cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx" 47 - mkdir -p "$out/llvm" 48 - cp -r ${monorepoSrc}/llvm/cmake "$out/llvm" 49 - '' 50 - + lib.optionalString (lib.versionAtLeast release_version "15") '' 51 - cp -r ${monorepoSrc}/llvm/utils "$out/llvm" 52 - cp -r ${monorepoSrc}/runtimes "$out" 53 - '' 54 - ) 55 - else 56 - src; 57 - 58 - sourceRoot = 59 - if lib.versionAtLeast release_version "15" then 60 - "${finalAttrs.src.name}/runtimes" 61 - else 62 - "${finalAttrs.src.name}/libunwind"; 63 - 64 - outputs = [ 65 - "out" 66 - "dev" 67 - ]; 68 - 69 - nativeBuildInputs = [ 70 - cmake 71 - ] 72 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 73 - ninja 74 - python3 75 - ]; 76 - 77 - cmakeFlags = [ 78 - (lib.cmakeBool "LIBUNWIND_ENABLE_SHARED" enableShared) 79 - ] 80 - ++ lib.optional (lib.versionAtLeast release_version "15") ( 81 - lib.cmakeFeature "LLVM_ENABLE_RUNTIMES" "libunwind" 82 - ) 83 - ++ lib.optionals (lib.versions.major release_version == "12" && stdenv.hostPlatform.isDarwin) [ 84 - (lib.cmakeBool "CMAKE_CXX_COMPILER_WORKS" true) 85 - ] 86 - ++ devExtraCmakeFlags; 87 - 88 - prePatch = 89 - lib.optionalString 90 - (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) 91 - '' 92 - cd ../libunwind 93 - chmod -R u+w . 94 - ''; 95 - 96 - postPatch = 97 - lib.optionalString 98 - (lib.versionAtLeast release_version "15" && (hasPatches || lib.versionOlder release_version "18")) 99 - '' 100 - cd ../runtimes 101 - ''; 102 - 103 - postInstall = 104 - lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) 105 - '' 106 - # libcxxabi wants to link to libunwind_shared.so (?). 107 - ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so 108 - '' 109 - + lib.optionalString (enableShared && stdenv.hostPlatform.isWindows) '' 110 - ln -s $out/lib/libunwind.dll.a $out/lib/libunwind_shared.dll.a 27 + src = 28 + if monorepoSrc != null then 29 + runCommand "libunwind-src-${version}" { inherit (monorepoSrc) passthru; } '' 30 + mkdir -p "$out" 31 + cp -r ${monorepoSrc}/cmake "$out" 32 + cp -r ${monorepoSrc}/libunwind "$out" 33 + mkdir -p "$out/libcxx" 34 + cp -r ${monorepoSrc}/libcxx/cmake "$out/libcxx" 35 + cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx" 36 + mkdir -p "$out/llvm" 37 + cp -r ${monorepoSrc}/llvm/cmake "$out/llvm" 38 + cp -r ${monorepoSrc}/llvm/utils "$out/llvm" 39 + cp -r ${monorepoSrc}/runtimes "$out" 111 40 '' 112 - + lib.optionalString (doFakeLibgcc && !stdenv.hostPlatform.isWindows) '' 113 - ln -s $out/lib/libunwind.so $out/lib/libgcc_s.so 114 - ln -s $out/lib/libunwind.so $out/lib/libgcc_s.so.1 115 - '' 116 - + lib.optionalString (doFakeLibgcc && stdenv.hostPlatform.isWindows) '' 117 - ln -s $out/lib/libunwind.dll.a $out/lib/libgcc_s.dll.a 118 - ''; 41 + else 42 + src; 119 43 120 - meta = llvm_meta // { 121 - # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst 122 - homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library"; 123 - description = "LLVM's unwinder library"; 124 - longDescription = '' 125 - The unwind library provides a family of _Unwind_* functions implementing 126 - the language-neutral stack unwinding portion of the Itanium C++ ABI (Level 127 - I). It is a dependency of the C++ ABI library, and sometimes is a 128 - dependency of other runtimes. 129 - ''; 130 - }; 131 - } 132 - ) 44 + sourceRoot = "${finalAttrs.src.name}/runtimes"; 45 + 46 + outputs = [ 47 + "out" 48 + "dev" 49 + ]; 50 + 51 + nativeBuildInputs = [ 52 + cmake 53 + ninja 54 + python3 55 + ]; 56 + 57 + cmakeFlags = [ 58 + (lib.cmakeBool "LIBUNWIND_ENABLE_SHARED" enableShared) 59 + (lib.cmakeFeature "LLVM_ENABLE_RUNTIMES" "libunwind") 60 + ] 61 + ++ devExtraCmakeFlags; 62 + 63 + # TODO: Remove on `staging`. 64 + prePatch = ""; 65 + postPatch = ""; 66 + 67 + postInstall = 68 + lib.optionalString (enableShared && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) 69 + '' 70 + # libcxxabi wants to link to libunwind_shared.so (?). 71 + ln -s $out/lib/libunwind.so $out/lib/libunwind_shared.so 72 + '' 73 + + lib.optionalString (enableShared && stdenv.hostPlatform.isWindows) '' 74 + ln -s $out/lib/libunwind.dll.a $out/lib/libunwind_shared.dll.a 75 + '' 76 + + lib.optionalString (doFakeLibgcc && !stdenv.hostPlatform.isWindows) '' 77 + ln -s $out/lib/libunwind.so $out/lib/libgcc_s.so 78 + ln -s $out/lib/libunwind.so $out/lib/libgcc_s.so.1 79 + '' 80 + + lib.optionalString (doFakeLibgcc && stdenv.hostPlatform.isWindows) '' 81 + ln -s $out/lib/libunwind.dll.a $out/lib/libgcc_s.dll.a 82 + ''; 83 + 84 + meta = llvm_meta // { 85 + # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst 86 + homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library"; 87 + description = "LLVM's unwinder library"; 88 + longDescription = '' 89 + The unwind library provides a family of _Unwind_* functions implementing 90 + the language-neutral stack unwinding portion of the Itanium C++ ABI (Level 91 + I). It is a dependency of the C++ ABI library, and sometimes is a 92 + dependency of other runtimes. 93 + ''; 94 + }; 95 + })
+19 -38
pkgs/development/compilers/llvm/common/lld/default.nix
··· 22 22 23 23 src = 24 24 if monorepoSrc != null then 25 - runCommand "lld-src-${version}" { inherit (monorepoSrc) passthru; } ( 26 - '' 27 - mkdir -p "$out" 28 - '' 29 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 30 - cp -r ${monorepoSrc}/cmake "$out" 31 - '' 32 - + '' 33 - cp -r ${monorepoSrc}/lld "$out" 34 - mkdir -p "$out/libunwind" 35 - cp -r ${monorepoSrc}/libunwind/include "$out/libunwind" 36 - mkdir -p "$out/llvm" 37 - '' 38 - ) 25 + runCommand "lld-src-${version}" { inherit (monorepoSrc) passthru; } ('' 26 + mkdir -p "$out" 27 + cp -r ${monorepoSrc}/cmake "$out" 28 + cp -r ${monorepoSrc}/lld "$out" 29 + mkdir -p "$out/libunwind" 30 + cp -r ${monorepoSrc}/libunwind/include "$out/libunwind" 31 + mkdir -p "$out/llvm" 32 + '') 39 33 else 40 34 src; 41 35 ··· 38 44 patches = [ 39 45 (getVersionFile "lld/gnu-install-dirs.patch") 40 46 ] 41 - ++ lib.optional (lib.versions.major release_version == "14") ( 42 - getVersionFile "lld/fix-root-src-dir.patch" 43 - ) 44 - ++ lib.optional (lib.versionAtLeast release_version "16" && lib.versionOlder release_version "18") ( 45 - getVersionFile "lld/add-table-base.patch" 46 - ) 47 47 ++ lib.optional (lib.versions.major release_version == "18") ( 48 48 # https://github.com/llvm/llvm-project/pull/97122 49 49 fetchpatch { ··· 48 60 } 49 61 ); 50 62 51 - nativeBuildInputs = [ cmake ] ++ lib.optional (lib.versionAtLeast release_version "15") ninja; 63 + nativeBuildInputs = [ 64 + cmake 65 + ninja 66 + ]; 52 67 buildInputs = [ 53 68 libllvm 54 69 libxml2 55 70 ]; 56 71 57 - cmakeFlags = 58 - lib.optionals (lib.versionOlder release_version "14") [ 59 - (lib.cmakeFeature "LLVM_CONFIG_PATH" "${libllvm.dev}/bin/llvm-config${ 60 - lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native" 61 - }") 62 - ] 63 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 64 - (lib.cmakeFeature "LLD_INSTALL_PACKAGE_DIR" "${placeholder "dev"}/lib/cmake/lld") 65 - ] 66 - ++ [ 67 - (lib.cmakeFeature "LLVM_TABLEGEN_EXE" "${buildLlvmTools.tblgen}/bin/llvm-tblgen") 68 - ] 69 - ++ devExtraCmakeFlags; 72 + cmakeFlags = [ 73 + (lib.cmakeFeature "LLD_INSTALL_PACKAGE_DIR" "${placeholder "dev"}/lib/cmake/lld") 74 + (lib.cmakeFeature "LLVM_TABLEGEN_EXE" "${buildLlvmTools.tblgen}/bin/llvm-tblgen") 75 + ] 76 + ++ devExtraCmakeFlags; 70 77 71 - postPatch = lib.optionalString (lib.versionOlder release_version "14") '' 72 - substituteInPlace MachO/CMakeLists.txt --replace-fail \ 73 - '(''${LLVM_MAIN_SRC_DIR}/' '(../' 74 - ''; 78 + # TODO: Remove on `staging`. 79 + postPatch = ""; 75 80 76 81 # Musl's default stack size is too small for lld to be able to link Firefox. 77 82 LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
+24 -98
pkgs/development/compilers/llvm/common/lldb/default.nix
··· 32 32 33 33 let 34 34 vscodeExt = { 35 - name = if lib.versionAtLeast release_version "18" then "lldb-dap" else "lldb-vscode"; 36 - version = if lib.versionAtLeast release_version "18" then "0.2.0" else "0.1.0"; 35 + name = "lldb-dap"; 36 + version = "0.2.0"; 37 37 }; 38 38 in 39 39 ··· 49 49 runCommand "lldb-src-${version}" { inherit (monorepoSrc) passthru; } ( 50 50 '' 51 51 mkdir -p "$out" 52 - '' 53 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 54 52 cp -r ${monorepoSrc}/cmake "$out" 55 - '' 56 - + '' 57 53 cp -r ${monorepoSrc}/lldb "$out" 58 54 '' 59 55 + lib.optionalString (lib.versionAtLeast release_version "19" && enableManpages) '' ··· 68 72 "dev" 69 73 ]; 70 74 71 - sourceRoot = lib.optional (lib.versionAtLeast release_version "13") "${finalAttrs.src.name}/lldb"; 75 + sourceRoot = "${finalAttrs.src.name}/lldb"; 72 76 73 - patches = 74 - let 75 - resourceDirPatch = 76 - (replaceVars (getVersionFile "lldb/resource-dir.patch") { 77 - clangLibDir = "${lib.getLib libclang}/lib"; 78 - }).overrideAttrs 79 - (_: _: { name = "resource-dir.patch"; }); 80 - in 81 - lib.optionals (lib.versionOlder release_version "15") [ 82 - # Fixes for SWIG 4 83 - (fetchpatch2 { 84 - url = "https://github.com/llvm/llvm-project/commit/81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63.patch?full_index=1"; 85 - stripLen = 1; 86 - hash = "sha256-Znw+C0uEw7lGETQLKPBZV/Ymo2UigZS+Hv/j1mUo7p0="; 87 - }) 88 - (fetchpatch2 { 89 - url = "https://github.com/llvm/llvm-project/commit/f0a25fe0b746f56295d5c02116ba28d2f965c175.patch?full_index=1"; 90 - stripLen = 1; 91 - hash = "sha256-QzVeZzmc99xIMiO7n//b+RNAvmxghISKQD93U2zOgFI="; 92 - }) 93 - ] 94 - ++ lib.optionals (lib.versionOlder release_version "16") [ 95 - # Fixes for SWIG 4 96 - (fetchpatch2 { 97 - url = "https://github.com/llvm/llvm-project/commit/ba35c27ec9aa9807f5b4be2a0c33ca9b045accc7.patch?full_index=1"; 98 - stripLen = 1; 99 - hash = "sha256-LXl+WbpmWZww5xMDrle3BM2Tw56v8k9LO1f1Z1/wDTs="; 100 - }) 101 - (fetchpatch2 { 102 - url = "https://github.com/llvm/llvm-project/commit/9ec115978ea2bdfc60800cd3c21264341cdc8b0a.patch?full_index=1"; 103 - stripLen = 1; 104 - hash = "sha256-u0zSejEjfrH3ZoMFm1j+NVv2t5AP9cE5yhsrdTS1dG4="; 105 - }) 106 - 107 - # FIXME: do we need this after 15? 108 - (getVersionFile "lldb/procfs.patch") 109 - ] 110 - ++ lib.optional (lib.versionOlder release_version "18") (fetchpatch { 111 - name = "libcxx-19-char_traits.patch"; 112 - url = "https://github.com/llvm/llvm-project/commit/68744ffbdd7daac41da274eef9ac0d191e11c16d.patch"; 113 - stripLen = 1; 114 - hash = "sha256-QCGhsL/mi7610ZNb5SqxjRGjwJeK2rwtsFVGeG3PUGc="; 115 - }) 116 - ++ lib.optionals (lib.versionOlder release_version "17") [ 117 - resourceDirPatch 118 - (fetchpatch { 119 - name = "add-cstdio.patch"; 120 - url = "https://github.com/llvm/llvm-project/commit/73e15b5edb4fa4a77e68c299a6e3b21e610d351f.patch"; 121 - stripLen = 1; 122 - hash = "sha256-eFcvxZaAuBsY/bda1h9212QevrXyvCHw8Cr9ngetDr0="; 123 - }) 124 - ] 125 - ++ lib.optional (lib.versionOlder release_version "14") ( 126 - getVersionFile "lldb/gnu-install-dirs.patch" 127 - ) 128 - ++ lib.optional (lib.versionAtLeast release_version "14") ./gnu-install-dirs.patch; 77 + patches = [ ./gnu-install-dirs.patch ]; 129 78 130 79 nativeBuildInputs = [ 131 80 cmake ··· 83 142 ] 84 143 ++ lib.optionals enableManpages [ 85 144 python3.pkgs.sphinx 86 - ] 87 - ++ lib.optionals (lib.versionOlder release_version "18" && enableManpages) [ 88 - python3.pkgs.recommonmark 89 - ] 90 - ++ lib.optionals (lib.versionAtLeast release_version "18" && enableManpages) [ 91 145 python3.pkgs.myst-parser 92 146 ] 93 - ++ lib.optionals (lib.versionAtLeast release_version "14") [ 147 + # TODO: Clean up on `staging`. 148 + ++ [ 94 149 ninja 95 150 ]; 96 151 ··· 96 159 libedit 97 160 libxml2 98 161 libllvm 99 - ] 100 - ++ lib.optionals (lib.versionAtLeast release_version "16") [ 101 162 # Starting with LLVM 16, the resource dir patch is no longer enough to get 102 163 # libclang into the rpath of the lldb executables. By putting it into 103 164 # buildInputs cc-wrapper will set up rpath correctly for us. ··· 119 184 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ 120 185 (lib.cmakeFeature "LLDB_CODESIGN_IDENTITY" "") # codesigning makes nondeterministic 121 186 ] 122 - ++ lib.optionals (lib.versionAtLeast release_version "17") [ 187 + # TODO: Clean up on `staging`. 188 + ++ [ 123 189 (lib.cmakeFeature "CLANG_RESOURCE_DIR" "../../../../${lib.getLib libclang}") 124 190 ] 125 - ++ lib.optionals enableManpages ( 126 - [ 127 - (lib.cmakeBool "LLVM_ENABLE_SPHINX" true) 128 - (lib.cmakeBool "SPHINX_OUTPUT_MAN" true) 129 - (lib.cmakeBool "SPHINX_OUTPUT_HTML" false) 130 - ] 131 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 132 - # docs reference `automodapi` but it's not added to the extensions list when 133 - # only building the manpages: 134 - # https://github.com/llvm/llvm-project/blob/af6ec9200b09039573d85e349496c4f5b17c3d7f/lldb/docs/conf.py#L54 135 - # 136 - # so, we just ignore the resulting errors 137 - (lib.cmakeBool "SPHINX_WARNINGS_AS_ERRORS" false) 138 - ] 139 - ) 191 + ++ lib.optionals enableManpages [ 192 + (lib.cmakeBool "LLVM_ENABLE_SPHINX" true) 193 + (lib.cmakeBool "SPHINX_OUTPUT_MAN" true) 194 + (lib.cmakeBool "SPHINX_OUTPUT_HTML" false) 195 + # docs reference `automodapi` but it's not added to the extensions list when 196 + # only building the manpages: 197 + # https://github.com/llvm/llvm-project/blob/af6ec9200b09039573d85e349496c4f5b17c3d7f/lldb/docs/conf.py#L54 198 + # 199 + # so, we just ignore the resulting errors 200 + (lib.cmakeBool "SPHINX_WARNINGS_AS_ERRORS" false) 201 + ] 140 202 ++ lib.optionals finalAttrs.finalPackage.doCheck [ 141 203 (lib.cmakeFeature "LLDB_TEST_C_COMPILER" "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc") 142 204 (lib.cmakeFeature "-DLLDB_TEST_CXX_COMPILER" "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++") ··· 141 209 ++ devExtraCmakeFlags; 142 210 143 211 doCheck = false; 144 - doInstallCheck = lib.versionOlder release_version "15"; 212 + doInstallCheck = false; 145 213 146 214 # TODO: cleanup with mass-rebuild 147 215 installCheckPhase = '' ··· 149 217 echo "ERROR: python files not installed where expected!"; 150 218 return 1; 151 219 fi 152 - '' # Something lua is built on older versions but this file doesn't exist. 153 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 154 220 if [ ! -e "''${!outputLib}/lib/lua/${lua5_3.luaversion}/lldb.so" ] ; then 155 221 echo "ERROR: lua files not installed where expected!"; 156 222 return 1; ··· 162 232 # vscode: 163 233 install -D ../tools/${vscodeExt.name}/package.json $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/package.json 164 234 mkdir -p $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin 165 - ln -s $out/bin/*${ 166 - if lib.versionAtLeast release_version "18" then vscodeExt.name else "-vscode" 167 - } $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin 235 + ln -s $out/bin/*${vscodeExt.name} $out/share/vscode/extensions/llvm-org.${vscodeExt.name}-${vscodeExt.version}/bin 168 236 ''; 169 237 170 238 passthru.vscodeExtName = vscodeExt.name; ··· 178 250 larger LLVM Project, such as the Clang expression parser and LLVM 179 251 disassembler. 180 252 ''; 181 - broken = lib.versionOlder release_version "14"; 182 253 mainProgram = "lldb"; 183 254 }; 184 255 } 185 256 // lib.optionalAttrs enableManpages { 186 257 pname = "lldb-manpages"; 187 258 188 - buildPhase = lib.optionalString (lib.versionOlder release_version "15") '' 189 - make ${if (lib.versionOlder release_version "12") then "docs-man" else "docs-lldb-man"} 190 - ''; 259 + # TODO: Remove on `staging`. 260 + buildPhase = ""; 191 261 192 - ninjaFlags = lib.optionals (lib.versionAtLeast release_version "15") [ "docs-lldb-man" ]; 262 + ninjaFlags = [ "docs-lldb-man" ]; 193 263 194 264 propagatedBuildInputs = [ ]; 195 265
+163 -396
pkgs/development/compilers/llvm/common/llvm/default.nix
··· 31 31 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 32 32 # broken for the armv7l builder 33 33 && !stdenv.hostPlatform.isAarch, 34 - enablePolly ? lib.versionAtLeast release_version "14", 34 + enablePolly ? true, 35 35 enableTerminfo ? true, 36 36 devExtraCmakeFlags ? [ ], 37 37 getVersionFile, ··· 83 83 pname = "llvm"; 84 84 inherit version; 85 85 86 - # Used when creating a version-suffixed symlink of libLLVM.dylib 86 + # TODO: Remove on `staging`. 87 87 shortVersion = lib.concatStringsSep "." (lib.take 1 (lib.splitString "." release_version)); 88 88 89 89 src = ··· 92 92 '' 93 93 mkdir -p "$out" 94 94 cp -r ${monorepoSrc}/llvm "$out" 95 - '' 96 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 97 95 cp -r ${monorepoSrc}/cmake "$out" 98 96 cp -r ${monorepoSrc}/third-party "$out" 99 97 '' ··· 121 123 ]; 122 124 123 125 patches = 124 - lib.optional (lib.versionOlder release_version "14") 125 - # When cross-compiling we configure llvm-config-native with an approximation 126 - # of the flags used for the normal LLVM build. To avoid the need for building 127 - # a native libLLVM.so (which would fail) we force llvm-config to be linked 128 - # statically against the necessary LLVM components always. 129 - ./llvm-config-link-static.patch 130 - ++ lib.optionals (lib.versions.major release_version == "12") [ 131 - # Fix llvm being miscompiled by some gccs. See https://github.com/llvm/llvm-project/issues/49955 132 - (getVersionFile "llvm/fix-llvm-issue-49955.patch") 133 - 134 - # On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test. 135 - (fetchpatch { 136 - name = "uops-CMOV16rm-noreg.diff"; 137 - url = "https://github.com/llvm/llvm-project/commit/9e9f991ac033.diff"; 138 - sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi"; 139 - stripLen = 1; 140 - }) 141 - ] 142 126 # Support custom installation dirs 143 127 # Originally based off https://reviews.llvm.org/D99484 144 128 # Latest state: https://github.com/llvm/llvm-project/pull/125376 145 - ++ [ (getVersionFile "llvm/gnu-install-dirs.patch") ] 146 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 129 + [ (getVersionFile "llvm/gnu-install-dirs.patch") ] 130 + ++ [ 147 131 # Running the tests involves invoking binaries (like `opt`) that depend on 148 132 # the LLVM dylibs and reference them by absolute install path (i.e. their 149 133 # nix store path). ··· 168 188 (getVersionFile "llvm/lit-shell-script-runner-set-dyld-library-path.patch") 169 189 ] 170 190 ++ 171 - lib.optional (lib.versions.major release_version == "13") 172 - # Fix random compiler crashes: https://bugs.llvm.org/show_bug.cgi?id=50611 173 - ( 174 - fetchpatch { 175 - url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/4764a4f8c920912a2bfd8b0eea57273acfe0d8a8/trunk/no-strict-aliasing-DwarfCompileUnit.patch"; 176 - sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g"; 177 - stripLen = 1; 178 - } 179 - ) 180 - ++ 181 - lib.optional (lib.versionAtLeast release_version "12" && lib.versionOlder release_version "19") 191 + lib.optional (lib.versionOlder release_version "19") 182 192 # Add missing include headers to build against gcc-15: 183 193 # https://github.com/llvm/llvm-project/pull/101761 184 194 ( ··· 176 206 url = "https://github.com/llvm/llvm-project/commit/7e44305041d96b064c197216b931ae3917a34ac1.patch"; 177 207 hash = "sha256-1htuzsaPHbYgravGc1vrR8sqpQ/NSQ8PUZeAU8ucCFk="; 178 208 stripLen = 1; 179 - } 180 - ) 181 - ++ lib.optionals (lib.versionOlder release_version "16") [ 182 - # Fix musl build. 183 - (fetchpatch { 184 - url = "https://github.com/llvm/llvm-project/commit/5cd554303ead0f8891eee3cd6d25cb07f5a7bf67.patch"; 185 - relative = "llvm"; 186 - hash = "sha256-XPbvNJ45SzjMGlNUgt/IgEvM2dHQpDOe6woUJY+nUYA="; 187 - }) 188 - # Fix for Python 3.13 189 - (getVersionFile "llvm/no-pipes.patch") 190 - ] 191 - ++ lib.optionals (lib.versionOlder release_version "14") [ 192 - # Backport gcc-13 fixes with missing includes. 193 - (fetchpatch { 194 - name = "signals-gcc-13.patch"; 195 - url = "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch"; 196 - hash = "sha256-CXwYxQezTq5vdmc8Yn88BUAEly6YZ5VEIA6X3y5NNOs="; 197 - stripLen = 1; 198 - }) 199 - (fetchpatch { 200 - name = "base64-gcc-13.patch"; 201 - url = "https://github.com/llvm/llvm-project/commit/5e9be93566f39ee6cecd579401e453eccfbe81e5.patch"; 202 - hash = "sha256-PAwrVrvffPd7tphpwCkYiz+67szPRzRB2TXBvKfzQ7U="; 203 - stripLen = 1; 204 - }) 205 - ] 206 - ++ 207 - lib.optionals 208 - ( 209 - (lib.versionAtLeast (lib.versions.major release_version) "14") 210 - && (lib.versionOlder (lib.versions.major release_version) "17") 211 - ) 212 - [ 213 - # fix RuntimeDyld usage on aarch64-linux (e.g. python312Packages.numba tests) 214 - # See also: https://github.com/numba/numba/issues/9109 215 - (fetchpatch { 216 - url = "https://github.com/llvm/llvm-project/commit/2e1b838a889f9793d4bcd5dbfe10db9796b77143.patch"; 217 - relative = "llvm"; 218 - hash = "sha256-Ot45P/iwaR4hkcM3xtLwfryQNgHI6pv6ADjv98tgdZA="; 219 - }) 220 - ] 221 - ++ 222 - lib.optional (lib.versions.major release_version == "17") 223 - # Fixes a crash with -fzero-call-used-regs=used-gpr 224 - # See also https://github.com/llvm/llvm-project/issues/75168 225 - ( 226 - fetchpatch { 227 - name = "fix-fzero-call-used-regs.patch"; 228 - url = "https://github.com/llvm/llvm-project/commit/f800c1f3b207e7bcdc8b4c7192928d9a078242a0.patch"; 229 - stripLen = 1; 230 - hash = "sha256-e8YKrMy2rGcSJGC6er2V66cOnAnI+u1/yImkvsRsmg8="; 231 209 } 232 210 ) 233 211 ++ lib.optionals (lib.versions.major release_version == "18") [ ··· 195 277 hash = "sha256-fqw5gTSEOGs3kAguR4tINFG7Xja1RAje+q67HJt2nGg="; 196 278 }) 197 279 ] 198 - ++ 199 - lib.optionals (lib.versionAtLeast release_version "17" && lib.versionOlder release_version "19") 200 - [ 201 - # Fixes test-suite on glibc 2.40 (https://github.com/llvm/llvm-project/pull/100804) 202 - (fetchpatch { 203 - url = "https://github.com/llvm/llvm-project/commit/1e8df9e85a1ff213e5868bd822877695f27504ad.patch"; 204 - hash = "sha256-mvBlG2RxpZPFnPI7jvCMz+Fc8JuM15Ye3th1FVZMizE="; 205 - stripLen = 1; 206 - }) 207 - ] 280 + ++ lib.optionals (lib.versionOlder release_version "19") [ 281 + # Fixes test-suite on glibc 2.40 (https://github.com/llvm/llvm-project/pull/100804) 282 + (fetchpatch { 283 + url = "https://github.com/llvm/llvm-project/commit/1e8df9e85a1ff213e5868bd822877695f27504ad.patch"; 284 + hash = "sha256-mvBlG2RxpZPFnPI7jvCMz+Fc8JuM15Ye3th1FVZMizE="; 285 + stripLen = 1; 286 + }) 287 + ] 208 288 ++ lib.optionals enablePolly [ 209 289 # Just like the `gnu-install-dirs` patch, but for `polly`. 210 290 (getVersionFile "llvm/gnu-install-dirs-polly.patch") 211 291 ] 212 - ++ 213 - lib.optional (lib.versionAtLeast release_version "15") 214 - # Just like the `llvm-lit-cfg` patch, but for `polly`. 215 - (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch") 292 + ++ [ 293 + # Just like the `llvm-lit-cfg` patch, but for `polly`. 294 + (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch") 295 + ] 216 296 ++ 217 297 lib.optional (lib.versions.major release_version == "20") 218 298 # Test failure on riscv64, fixed in llvm 21 ··· 229 313 # this is needed until scripts are updated to not use /usr/bin/uname on FreeBSD native 230 314 updateAutotoolsGnuConfigScriptsHook 231 315 python 316 + ninja 232 317 ] 233 - ++ (lib.optional (lib.versionAtLeast release_version "15") ninja) 234 318 ++ optionals enableManpages [ 235 319 # Note: we intentionally use `python3Packages` instead of `python3.pkgs`; 236 320 # splicing does *not* work with the latter. (TODO: fix) 237 321 python3Packages.sphinx 238 - ] 239 - ++ optionals (lib.versionOlder version "18" && enableManpages) [ 240 - python3Packages.recommonmark 241 - ] 242 - ++ optionals (lib.versionAtLeast version "18" && enableManpages) [ 243 322 python3Packages.myst-parser 244 323 ]; 245 324 ··· 244 333 ] 245 334 ++ optional enablePFM libpfm; # exegesis 246 335 247 - propagatedBuildInputs = 248 - (lib.optional ( 249 - lib.versionAtLeast release_version "14" || stdenv.buildPlatform == stdenv.hostPlatform 250 - ) ncurses) 251 - ++ [ zlib ]; 336 + propagatedBuildInputs = [ 337 + ncurses 338 + zlib 339 + ]; 340 + 341 + nativeCheckInputs = [ 342 + which 343 + ] 344 + ++ lib.optional stdenv.hostPlatform.isDarwin sysctl; 252 345 253 346 postPatch = 254 347 optionalString stdenv.hostPlatform.isDarwin ( ··· 263 348 + 264 349 # As of LLVM 15, marked as XFAIL on arm64 macOS but lit doesn't seem to pick 265 350 # this up: https://github.com/llvm/llvm-project/blob/c344d97a125b18f8fed0a64aace73c49a870e079/llvm/test/MC/ELF/cfi-version.ll#L7 266 - (optionalString (lib.versionAtLeast release_version "15") ( 267 - '' 268 - rm test/MC/ELF/cfi-version.ll 351 + '' 352 + rm test/MC/ELF/cfi-version.ll 269 353 270 - '' 271 - + 272 - # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) 273 - # and thus fails under the sandbox: 274 - ( 275 - if lib.versionAtLeast release_version "16" then 276 - '' 277 - substituteInPlace unittests/TargetParser/Host.cpp \ 278 - --replace-fail '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers"}" 279 - '' 280 - else 281 - '' 282 - substituteInPlace unittests/Support/Host.cpp \ 283 - --replace-fail '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers"}" 284 - '' 285 - ) 286 - + 287 - # This test tries to call the intrinsics `@llvm.roundeven.f32` and 288 - # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` 289 - # and `roundeven` on macOS and FreeBSD. 290 - # 291 - # However these functions are glibc specific so the test fails: 292 - # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html 293 - # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html 294 - # 295 - # TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it 296 - # pass there? 297 - optionalString (lib.versionAtLeast release_version "16") '' 298 - substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ 299 - --replace-fail "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ 300 - --replace-fail "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" 301 - '' 302 - + 303 - # fails when run in sandbox 304 - optionalString (!stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "18") '' 305 - substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ 306 - --replace-fail "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" 307 - '' 308 - )) 354 + '' 355 + + 356 + # This test tries to call `sw_vers` by absolute path (`/usr/bin/sw_vers`) 357 + # and thus fails under the sandbox: 358 + '' 359 + substituteInPlace unittests/TargetParser/Host.cpp \ 360 + --replace-fail '/usr/bin/sw_vers' "${(builtins.toString darwin.DarwinTools) + "/bin/sw_vers"}" 361 + '' 362 + + 363 + # This test tries to call the intrinsics `@llvm.roundeven.f32` and 364 + # `@llvm.roundeven.f64` which seem to (incorrectly?) lower to `roundevenf` 365 + # and `roundeven` on macOS and FreeBSD. 366 + # 367 + # However these functions are glibc specific so the test fails: 368 + # - https://www.gnu.org/software/gnulib/manual/html_node/roundevenf.html 369 + # - https://www.gnu.org/software/gnulib/manual/html_node/roundeven.html 370 + # 371 + # TODO(@rrbutani): this seems to run fine on `aarch64-darwin`, why does it 372 + # pass there? 373 + '' 374 + substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ 375 + --replace-fail "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ 376 + --replace-fail "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" 377 + '' 378 + + 379 + # fails when run in sandbox 380 + optionalString (!stdenv.hostPlatform.isx86) '' 381 + substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ 382 + --replace-fail "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" 383 + '' 309 384 ) 310 385 + 311 386 # dup of above patch with different conditions 312 - optionalString 387 + optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86) ( 388 + # fails when run in sandbox 313 389 ( 314 - stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86 && lib.versionAtLeast release_version "15" 315 - ) 316 - ( 317 - optionalString (lib.versionOlder release_version "16") '' 318 - substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \ 319 - --replace-fail "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \ 320 - --replace-fail "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" "" 321 - 390 + '' 391 + substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ 392 + --replace-fail "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" 322 393 '' 323 394 + 324 - # fails when run in sandbox 325 - ( 326 - (optionalString (lib.versionAtLeast release_version "18") '' 327 - substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \ 328 - --replace-fail "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure" 329 - '') 330 - + 331 - # This test fails on darwin x86_64 because `sw_vers` reports a different 332 - # macOS version than what LLVM finds by reading 333 - # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into 334 - # the sandbox on macOS). 335 - # 336 - # The `sw_vers` provided by nixpkgs reports the macOS version associated 337 - # with the `CoreFoundation` framework with which it was built. Because 338 - # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what 339 - # `sw_vers` reports is not guaranteed to match the macOS version of the host 340 - # that's building this derivation. 341 - # 342 - # Astute readers will note that we only _patch_ this test on aarch64-darwin 343 - # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright. 344 - # So why does this test pass on aarch64? 345 - # 346 - # Well, it seems that `sw_vers` on aarch64 actually links against the _host_ 347 - # CoreFoundation framework instead of the nixpkgs provided one. 348 - # 349 - # Not entirely sure what the right fix is here. I'm assuming aarch64 350 - # `sw_vers` doesn't intentionally link against the host `CoreFoundation` 351 - # (still digging into how this ends up happening, will follow up) but that 352 - # aside I think the more pertinent question is: should we be patching LLVM's 353 - # macOS version detection logic to use `sw_vers` instead of reading host 354 - # paths? This *is* a way in which details about builder machines can creep 355 - # into the artifacts that are produced, affecting reproducibility, but it's 356 - # not clear to me when/where/for what this even gets used in LLVM. 357 - # 358 - # TODO(@rrbutani): fix/follow-up 359 - ( 360 - if lib.versionAtLeast release_version "16" then 361 - '' 362 - substituteInPlace unittests/TargetParser/Host.cpp \ 363 - --replace-fail "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" 364 - '' 365 - else 366 - '' 367 - substituteInPlace unittests/Support/Host.cpp \ 368 - --replace-fail "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" 369 - '' 370 - ) 371 - + 372 - # This test fails with a `dysmutil` crash; have not yet dug into what's 373 - # going on here (TODO(@rrbutani)). 374 - lib.optionalString (lib.versionOlder release_version "19") '' 375 - rm test/tools/dsymutil/ARM/obfuscated.test 376 - '' 377 - ) 395 + # This test fails on darwin x86_64 because `sw_vers` reports a different 396 + # macOS version than what LLVM finds by reading 397 + # `/System/Library/CoreServices/SystemVersion.plist` (which is passed into 398 + # the sandbox on macOS). 399 + # 400 + # The `sw_vers` provided by nixpkgs reports the macOS version associated 401 + # with the `CoreFoundation` framework with which it was built. Because 402 + # nixpkgs pins the SDK for `aarch64-darwin` and `x86_64-darwin` what 403 + # `sw_vers` reports is not guaranteed to match the macOS version of the host 404 + # that's building this derivation. 405 + # 406 + # Astute readers will note that we only _patch_ this test on aarch64-darwin 407 + # (to use the nixpkgs provided `sw_vers`) instead of disabling it outright. 408 + # So why does this test pass on aarch64? 409 + # 410 + # Well, it seems that `sw_vers` on aarch64 actually links against the _host_ 411 + # CoreFoundation framework instead of the nixpkgs provided one. 412 + # 413 + # Not entirely sure what the right fix is here. I'm assuming aarch64 414 + # `sw_vers` doesn't intentionally link against the host `CoreFoundation` 415 + # (still digging into how this ends up happening, will follow up) but that 416 + # aside I think the more pertinent question is: should we be patching LLVM's 417 + # macOS version detection logic to use `sw_vers` instead of reading host 418 + # paths? This *is* a way in which details about builder machines can creep 419 + # into the artifacts that are produced, affecting reproducibility, but it's 420 + # not clear to me when/where/for what this even gets used in LLVM. 421 + # 422 + # TODO(@rrbutani): fix/follow-up 423 + '' 424 + substituteInPlace unittests/TargetParser/Host.cpp \ 425 + --replace-fail "getMacOSHostVersion" "DISABLED_getMacOSHostVersion" 426 + '' 427 + + 428 + # This test fails with a `dysmutil` crash; have not yet dug into what's 429 + # going on here (TODO(@rrbutani)). 430 + lib.optionalString (lib.versionOlder release_version "19") '' 431 + rm test/tools/dsymutil/ARM/obfuscated.test 432 + '' 378 433 ) 434 + ) 379 435 + 380 436 # FileSystem permissions tests fail with various special bits 381 437 '' ··· 356 470 substituteInPlace unittests/IR/CMakeLists.txt \ 357 471 --replace-fail "PassBuilderCallbacksTest.cpp" "" 358 472 rm unittests/IR/PassBuilderCallbacksTest.cpp 473 + rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test 359 474 '' 360 - + lib.optionalString (lib.versionAtLeast release_version "13") '' 361 - rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test 362 - '' 363 - + lib.optionalString (lib.versionOlder release_version "13") '' 364 - # TODO: Fix failing tests: 365 - rm test/DebugInfo/X86/vla-multi.ll 366 - '' 367 475 + 368 476 # Fails in the presence of anti-virus software or other intrusion-detection software that 369 477 # modifies the atime when run. See #284056. 370 - lib.optionalString (lib.versionAtLeast release_version "16") ( 371 - '' 372 - rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test 373 - '' 374 - + lib.optionalString (lib.versionOlder release_version "17") '' 375 - 376 - '' 377 - ) 378 - + 379 - # timing-based tests are trouble 380 - lib.optionalString 381 - (lib.versionAtLeast release_version "15" && lib.versionOlder release_version "17") 382 - '' 383 - rm utils/lit/tests/googletest-timeout.py 384 - '' 478 + '' 479 + rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test 480 + '' 385 481 + 386 482 # valgrind unhappy with musl or glibc, but fails w/musl only 387 483 optionalString stdenv.hostPlatform.isMusl '' ··· 408 540 '' 409 541 + '' 410 542 patchShebangs test/BugPoint/compile-custom.ll.py 411 - '' 412 - + 413 - # Tweak tests to ignore namespace part of type to support 414 - # gcc-12: https://gcc.gnu.org/PR103598. 415 - # The change below mangles strings like: 416 - # CHECK-NEXT: Starting llvm::Function pass manager run. 417 - # to: 418 - # CHECK-NEXT: Starting {{.*}}Function pass manager run. 419 - (lib.optionalString (lib.versionOlder release_version "13") ( 420 - '' 421 - for f in \ 422 - test/Other/new-pass-manager.ll \ 423 - test/Other/new-pm-O0-defaults.ll \ 424 - test/Other/new-pm-defaults.ll \ 425 - test/Other/new-pm-lto-defaults.ll \ 426 - test/Other/new-pm-thinlto-defaults.ll \ 427 - test/Other/pass-pipeline-parsing.ll \ 428 - test/Transforms/Inline/cgscc-incremental-invalidate.ll \ 429 - test/Transforms/Inline/clear-analyses.ll \ 430 - test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \ 431 - test/Transforms/SCCP/ipsccp-preserve-analysis.ll \ 432 - test/Transforms/SCCP/preserve-analysis.ll \ 433 - test/Transforms/SROA/dead-inst.ll \ 434 - test/tools/gold/X86/new-pm.ll \ 435 - ; do 436 - echo "PATCH: $f" 437 - substituteInPlace $f \ 438 - --replace-quiet 'Starting llvm::' 'Starting {{.*}}' \ 439 - --replace-quiet 'Finished llvm::' 'Finished {{.*}}' 440 - done 441 - '' 442 - + 443 - # gcc-13 fix 444 - '' 445 - sed -i '/#include <string>/i#include <cstdint>' \ 446 - include/llvm/DebugInfo/Symbolize/DIPrinter.h 447 - '' 448 - )); 543 + ''; 449 544 450 545 # Workaround for configure flags that need to have spaces 451 546 preConfigure = '' ··· 416 585 -DLLVM_LIT_ARGS="--verbose -j''${NIX_BUILD_CORES}" 417 586 ) 418 587 ''; 588 + 589 + # Defensive check: some paths (that we make symlinks to) depend on the release 590 + # version, for example: 591 + # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 592 + # 593 + # So we want to sure that the version in the source matches the release 594 + # version we were given. 595 + # 596 + # We do this check here, in the LLVM build, because it happens early. 597 + postConfigure = 598 + let 599 + v = lib.versions; 600 + major = v.major release_version; 601 + minor = v.minor release_version; 602 + patch = v.patch release_version; 603 + in 604 + '' 605 + # $1: part, $2: expected 606 + check_version() { 607 + part="''${1^^}" 608 + part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" 609 + 610 + if [[ "$part" != "$2" ]]; then 611 + echo >&2 \ 612 + "mismatch in the $1 version! we have version ${release_version}" \ 613 + "and expected the $1 version to be '$2'; the source has '$part' instead" 614 + exit 3 615 + fi 616 + } 617 + 618 + check_version major ${major} 619 + check_version minor ${minor} 620 + check_version patch ${patch} 621 + ''; 419 622 420 623 # E.g. Mesa uses the build-id as a cache key (see #93946): 421 624 LDFLAGS = optionalString ( ··· 467 602 # 468 603 # Some flags don't need to be repassed because LLVM already does so (like 469 604 # CMAKE_BUILD_TYPE), others are irrelevant to the result. 470 - flagsForLlvmConfig = 471 - ( 472 - if lib.versionOlder release_version "15" then 473 - [ 474 - (lib.cmakeFeature "LLVM_INSTALL_CMAKE_DIR" "${placeholder "dev"}/lib/cmake/llvm/") 475 - ] 476 - else 477 - [ 478 - (lib.cmakeFeature "LLVM_INSTALL_PACKAGE_DIR" "${placeholder "dev"}/lib/cmake/llvm") 479 - ] 480 - ) 481 - ++ [ 482 - (lib.cmakeBool "LLVM_ENABLE_RTTI" true) 483 - (lib.cmakeBool "LLVM_LINK_LLVM_DYLIB" enableSharedLibraries) 484 - (lib.cmakeFeature "LLVM_TABLEGEN" "${buildLlvmTools.tblgen}/bin/llvm-tblgen") 485 - ]; 605 + flagsForLlvmConfig = [ 606 + (lib.cmakeFeature "LLVM_INSTALL_PACKAGE_DIR" "${placeholder "dev"}/lib/cmake/llvm") 607 + (lib.cmakeBool "LLVM_ENABLE_RTTI" true) 608 + (lib.cmakeBool "LLVM_LINK_LLVM_DYLIB" enableSharedLibraries) 609 + (lib.cmakeFeature "LLVM_TABLEGEN" "${buildLlvmTools.tblgen}/bin/llvm-tblgen") 610 + ]; 486 611 in 487 612 flagsForLlvmConfig 488 613 ++ [ ··· 562 707 moveToOutput "bin/llvm-config*" "$dev" 563 708 substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${lib.toLower finalAttrs.finalPackage.cmakeBuildType}.cmake" \ 564 709 --replace-fail "$out/bin/llvm-config" "$dev/bin/llvm-config" 710 + substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ 711 + --replace-fail 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' 565 712 '' 566 - + ( 567 - if lib.versionOlder release_version "15" then 568 - '' 569 - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ 570 - --replace-fail 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")' 571 - '' 572 - else 573 - '' 574 - substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ 575 - --replace-fail 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")' 576 - '' 577 - ) 578 713 + optionalString (stdenv.hostPlatform.isDarwin && enableSharedLibraries) '' 579 - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${ 580 - if lib.versionOlder release_version "18" then "$shortVersion" else release_version 581 - }.dylib 714 + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib 582 715 '' 583 716 + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ( 584 717 if stdenv.buildPlatform.canExecute stdenv.hostPlatform then ··· 582 739 doCheck = 583 740 !isDarwinBootstrap 584 741 && !stdenv.hostPlatform.isAarch32 585 - && (if lib.versionOlder release_version "15" then stdenv.hostPlatform.isLinux else true) 586 742 && ( 587 743 !stdenv.hostPlatform.isx86_32 # TODO: why 588 744 ) ··· 614 772 ''; 615 773 }; 616 774 } 617 - // lib.optionalAttrs enableManpages ( 618 - { 619 - pname = "llvm-manpages"; 775 + // lib.optionalAttrs enableManpages { 776 + pname = "llvm-manpages"; 620 777 621 - propagatedBuildInputs = [ ]; 778 + propagatedBuildInputs = [ ]; 622 779 623 - postPatch = null; 624 - postInstall = null; 780 + ninjaFlags = [ "docs-llvm-man" ]; 781 + installTargets = [ "install-docs-llvm-man" ]; 625 782 626 - outputs = [ "out" ]; 783 + doCheck = false; 627 784 628 - doCheck = false; 785 + postPatch = null; 786 + postInstall = null; 629 787 630 - meta = llvm_meta // { 631 - description = "man pages for LLVM ${version}"; 632 - }; 633 - } 634 - // ( 635 - if lib.versionOlder release_version "15" then 636 - { 637 - buildPhase = '' 638 - make docs-llvm-man 639 - ''; 788 + outputs = [ "out" ]; 640 789 641 - installPhase = '' 642 - make -C docs install 643 - ''; 644 - } 645 - else 646 - { 647 - ninjaFlags = [ "docs-llvm-man" ]; 648 - installTargets = [ "install-docs-llvm-man" ]; 649 - 650 - postPatch = null; 651 - postInstall = null; 652 - } 653 - ) 654 - ) 655 - // lib.optionalAttrs (lib.versionAtLeast release_version "13") { 656 - nativeCheckInputs = [ 657 - which 658 - ] 659 - ++ lib.optional (stdenv.hostPlatform.isDarwin && lib.versionAtLeast release_version "15") sysctl; 660 - } 661 - // lib.optionalAttrs (lib.versionOlder release_version "15") { 662 - # hacky fix: created binaries need to be run before installation 663 - preBuild = '' 664 - mkdir -p $out/ 665 - ln -sv $PWD/lib $out 666 - ''; 667 - 668 - postBuild = '' 669 - rm -fR $out 670 - ''; 671 - 672 - preCheck = '' 673 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib 674 - ''; 675 - } 676 - // lib.optionalAttrs (lib.versionAtLeast release_version "15") { 677 - # Defensive check: some paths (that we make symlinks to) depend on the release 678 - # version, for example: 679 - # - https://github.com/llvm/llvm-project/blob/406bde9a15136254f2b10d9ef3a42033b3cb1b16/clang/lib/Headers/CMakeLists.txt#L185 680 - # 681 - # So we want to sure that the version in the source matches the release 682 - # version we were given. 683 - # 684 - # We do this check here, in the LLVM build, because it happens early. 685 - postConfigure = 686 - let 687 - v = lib.versions; 688 - major = v.major release_version; 689 - minor = v.minor release_version; 690 - patch = v.patch release_version; 691 - in 692 - '' 693 - # $1: part, $2: expected 694 - check_version() { 695 - part="''${1^^}" 696 - part="$(cat include/llvm/Config/llvm-config.h | grep "#define LLVM_VERSION_''${part} " | cut -d' ' -f3)" 697 - 698 - if [[ "$part" != "$2" ]]; then 699 - echo >&2 \ 700 - "mismatch in the $1 version! we have version ${release_version}" \ 701 - "and expected the $1 version to be '$2'; the source has '$part' instead" 702 - exit 3 703 - fi 704 - } 705 - 706 - check_version major ${major} 707 - check_version minor ${minor} 708 - check_version patch ${patch} 709 - ''; 790 + meta = llvm_meta // { 791 + description = "man pages for LLVM ${version}"; 792 + }; 710 793 } 711 794 )
+7 -13
pkgs/development/compilers/llvm/common/mlir/default.nix
··· 25 25 && (!stdenv.hostPlatform.isMusl); 26 26 27 27 # Blank llvm dir just so relative path works 28 - src = runCommand "${finalAttrs.pname}-src-${version}" { inherit (monorepoSrc) passthru; } ( 29 - '' 30 - mkdir -p "$out" 31 - '' 32 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 33 - cp -r ${monorepoSrc}/cmake "$out" 34 - '' 35 - + '' 36 - cp -r ${monorepoSrc}/mlir "$out" 37 - cp -r ${monorepoSrc}/third-party "$out/third-party" 28 + src = runCommand "${finalAttrs.pname}-src-${version}" { inherit (monorepoSrc) passthru; } ('' 29 + mkdir -p "$out" 30 + cp -r ${monorepoSrc}/cmake "$out" 31 + cp -r ${monorepoSrc}/mlir "$out" 32 + cp -r ${monorepoSrc}/third-party "$out/third-party" 38 33 39 - mkdir -p "$out/llvm" 40 - '' 41 - ); 34 + mkdir -p "$out/llvm" 35 + ''); 42 36 43 37 sourceRoot = "${finalAttrs.src.name}/mlir"; 44 38
+74 -101
pkgs/development/compilers/llvm/common/openmp/default.nix
··· 25 25 26 26 assert lib.assertMsg (ompdGdbSupport -> ompdSupport) "OMPD GDB support requires OMPD support!"; 27 27 28 - stdenv.mkDerivation ( 29 - finalAttrs: 30 - { 31 - pname = "openmp"; 32 - inherit version; 28 + stdenv.mkDerivation (finalAttrs: { 29 + pname = "openmp"; 30 + inherit version; 33 31 34 - src = 35 - if monorepoSrc != null then 36 - runCommand "openmp-src-${version}" { inherit (monorepoSrc) passthru; } ( 37 - '' 38 - mkdir -p "$out" 39 - '' 40 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 41 - cp -r ${monorepoSrc}/cmake "$out" 42 - '' 43 - + '' 44 - cp -r ${monorepoSrc}/openmp "$out" 45 - '' 46 - ) 47 - else 48 - src; 32 + src = 33 + if monorepoSrc != null then 34 + runCommand "openmp-src-${version}" { inherit (monorepoSrc) passthru; } ('' 35 + mkdir -p "$out" 36 + cp -r ${monorepoSrc}/cmake "$out" 37 + cp -r ${monorepoSrc}/openmp "$out" 38 + '') 39 + else 40 + src; 49 41 50 - sourceRoot = "${finalAttrs.src.name}/openmp"; 42 + sourceRoot = "${finalAttrs.src.name}/openmp"; 51 43 52 - outputs = [ "out" ] ++ lib.optionals (lib.versionAtLeast release_version "14") [ "dev" ]; 44 + outputs = [ 45 + "out" 46 + "dev" 47 + ]; 53 48 54 - patchFlags = if lib.versionOlder release_version "14" then [ "-p2" ] else null; 49 + # TODO: Remove on `staging`. 50 + patchFlags = null; 55 51 56 - patches = 57 - lib.optional (lib.versionAtLeast release_version "15" && lib.versionOlder release_version "19") ( 58 - getVersionFile "openmp/fix-find-tool.patch" 59 - ) 60 - ++ lib.optional (lib.versionAtLeast release_version "14" && lib.versionOlder release_version "18") ( 61 - getVersionFile "openmp/gnu-install-dirs.patch" 62 - ) 63 - ++ lib.optional (lib.versionAtLeast release_version "14") ( 64 - getVersionFile "openmp/run-lit-directly.patch" 65 - ) 66 - ++ 67 - lib.optional (lib.versionOlder release_version "14") 68 - # Fix cross. 69 - ( 70 - fetchpatch { 71 - url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch"; 72 - hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A="; 73 - } 74 - ); 75 - 76 - nativeBuildInputs = [ 77 - cmake 78 - python3.pythonOnBuildForHost 79 - perl 80 - ] 81 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 82 - ninja 83 - ] 84 - ++ lib.optionals (lib.versionAtLeast release_version "14") [ 85 - pkg-config 86 - lit 52 + patches = 53 + lib.optional (lib.versionOlder release_version "19") (getVersionFile "openmp/fix-find-tool.patch") 54 + ++ [ 55 + (getVersionFile "openmp/run-lit-directly.patch") 87 56 ]; 88 57 89 - buildInputs = [ 90 - (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 91 - ] 92 - ++ lib.optionals (ompdSupport && ompdGdbSupport) [ 93 - python3 94 - ]; 58 + nativeBuildInputs = [ 59 + cmake 60 + python3.pythonOnBuildForHost 61 + perl 62 + ninja 63 + pkg-config 64 + lit 65 + ]; 95 66 96 - cmakeFlags = [ 97 - (lib.cmakeBool "LIBOMP_ENABLE_SHARED" ( 98 - !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.hasSharedLibraries 99 - )) 100 - (lib.cmakeBool "LIBOMP_OMPD_SUPPORT" ompdSupport) 101 - (lib.cmakeBool "LIBOMP_OMPD_GDB_SUPPORT" ompdGdbSupport) 102 - ] 103 - ++ lib.optionals (lib.versions.major release_version == "13") [ 104 - (lib.cmakeBool "LIBOMPTARGET_BUILD_AMDGCN_BCLIB" false) # Building the AMDGCN device RTL fails 105 - ] 106 - ++ lib.optionals (lib.versionAtLeast release_version "14") [ 107 - (lib.cmakeFeature "CLANG_TOOL" "${clang-unwrapped}/bin/clang") 108 - (lib.cmakeFeature "OPT_TOOL" "${llvm}/bin/opt") 109 - (lib.cmakeFeature "LINK_TOOL" "${llvm}/bin/llvm-link") 110 - ] 111 - ++ devExtraCmakeFlags; 67 + buildInputs = [ 68 + (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) 69 + ] 70 + ++ lib.optionals (ompdSupport && ompdGdbSupport) [ 71 + python3 72 + ]; 112 73 113 - meta = llvm_meta // { 114 - homepage = "https://openmp.llvm.org/"; 115 - description = "Support for the OpenMP language"; 116 - longDescription = '' 117 - The OpenMP subproject of LLVM contains the components required to build an 118 - executable OpenMP program that are outside the compiler itself. 119 - Contains the code for the runtime library against which code compiled by 120 - "clang -fopenmp" must be linked before it can run and the library that 121 - supports offload to target devices. 122 - ''; 123 - # "All of the code is dual licensed under the MIT license and the UIUC 124 - # License (a BSD-like license)": 125 - license = with lib.licenses; [ 126 - mit 127 - ncsa 128 - ]; 129 - }; 130 - } 131 - // (lib.optionalAttrs (lib.versionAtLeast release_version "14") { 132 - doCheck = false; 133 - checkTarget = "check-openmp"; 134 - preCheck = '' 135 - patchShebangs ../tools/archer/tests/deflake.bash 74 + cmakeFlags = [ 75 + (lib.cmakeBool "LIBOMP_ENABLE_SHARED" ( 76 + !stdenv.hostPlatform.isStatic && stdenv.hostPlatform.hasSharedLibraries 77 + )) 78 + (lib.cmakeBool "LIBOMP_OMPD_SUPPORT" ompdSupport) 79 + (lib.cmakeBool "LIBOMP_OMPD_GDB_SUPPORT" ompdGdbSupport) 80 + (lib.cmakeFeature "CLANG_TOOL" "${clang-unwrapped}/bin/clang") 81 + (lib.cmakeFeature "OPT_TOOL" "${llvm}/bin/opt") 82 + (lib.cmakeFeature "LINK_TOOL" "${llvm}/bin/llvm-link") 83 + ] 84 + ++ devExtraCmakeFlags; 85 + 86 + doCheck = false; 87 + 88 + checkTarget = "check-openmp"; 89 + 90 + preCheck = '' 91 + patchShebangs ../tools/archer/tests/deflake.bash 92 + ''; 93 + 94 + meta = llvm_meta // { 95 + homepage = "https://openmp.llvm.org/"; 96 + description = "Support for the OpenMP language"; 97 + longDescription = '' 98 + The OpenMP subproject of LLVM contains the components required to build an 99 + executable OpenMP program that are outside the compiler itself. 100 + Contains the code for the runtime library against which code compiled by 101 + "clang -fopenmp" must be linked before it can run and the library that 102 + supports offload to target devices. 136 103 ''; 137 - }) 138 - ) 104 + # "All of the code is dual licensed under the MIT license and the UIUC 105 + # License (a BSD-like license)": 106 + license = with lib.licenses; [ 107 + mit 108 + ncsa 109 + ]; 110 + }; 111 + })
+8 -151
pkgs/development/compilers/llvm/common/patches.nix
··· 1 1 { 2 2 "clang/gnu-install-dirs.patch" = [ 3 3 { 4 - before = "14"; 5 - path = ../12; 6 - } 7 - { 8 4 after = "19"; 9 5 path = ../19; 10 6 } 11 7 ]; 12 8 "clang/purity.patch" = [ 13 9 { 14 - after = "18"; 15 10 path = ../18; 16 - } 17 - { 18 - before = "17"; 19 - after = "15"; 20 - path = ../15; 21 - } 22 - { 23 - before = "16"; 24 - path = ../12; 25 - } 26 - ]; 27 - "clang/aarch64-tblgen.patch" = [ 28 - { 29 - after = "17"; 30 - before = "18"; 31 - path = ../17; 32 - } 33 - ]; 34 - "lld/add-table-base.patch" = [ 35 - { 36 - after = "16"; 37 - path = ../16; 38 11 } 39 12 ]; 40 13 "lld/gnu-install-dirs.patch" = [ 41 14 { 42 - after = "18"; 43 15 path = ../18; 44 - } 45 - { 46 - before = "14"; 47 - path = ../12; 48 16 } 49 17 ]; 50 18 "llvm/gnu-install-dirs.patch" = [ ··· 31 63 path = ../20; 32 64 } 33 65 { 34 - after = "18"; 35 66 before = "20"; 36 67 path = ../18; 37 68 } ··· 42 75 } 43 76 { 44 77 before = "20"; 45 - after = "18"; 46 78 path = ../18; 47 - } 48 - { 49 - before = "18"; 50 - after = "14"; 51 - path = ../14; 52 79 } 53 80 ]; 54 81 "llvm/llvm-lit-cfg-add-libs-to-dylib-path.patch" = [ 55 82 { 56 - before = "17"; 57 - after = "15"; 58 - path = ../15; 59 - } 60 - { 61 - after = "17"; 62 - path = ../17; 83 + path = ../18; 63 84 } 64 85 ]; 65 86 "llvm/lit-shell-script-runner-set-dyld-library-path.patch" = [ 66 87 { 67 - after = "18"; 68 88 path = ../18; 69 - } 70 - { 71 - after = "16"; 72 - before = "18"; 73 - path = ../16; 74 89 } 75 90 ]; 76 91 "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch" = [ 77 92 { 78 - after = "15"; 79 - path = ../15; 80 - } 81 - ]; 82 - "libunwind/gnu-install-dirs.patch" = [ 83 - { 84 - before = "17"; 85 - after = "15"; 86 - path = ../15; 93 + path = ../18; 87 94 } 88 95 ]; 89 96 "compiler-rt/X86-support-extension.patch" = [ 90 97 { 91 - after = "15"; 92 - path = ../15; 93 - } 94 - { 95 - before = "15"; 96 - path = ../12; 98 + path = ../18; 97 99 } 98 100 ]; 99 101 "compiler-rt/armv6-scudo-libatomic.patch" = [ ··· 71 135 path = ../19; 72 136 } 73 137 { 74 - after = "15"; 75 138 before = "19"; 76 - path = ../15; 77 - } 78 - { 79 - before = "15"; 80 - path = ../14; 81 - } 82 - ]; 83 - "compiler-rt/armv7l.patch" = [ 84 - { 85 - before = "15"; 86 - after = "13"; 87 - path = ../13; 88 - } 89 - ]; 90 - "compiler-rt/gnu-install-dirs.patch" = [ 91 - { 92 - before = "14"; 93 - path = ../12; 94 - } 95 - { 96 - after = "13"; 97 - before = "15"; 98 - path = ../14; 99 - } 100 - { 101 - after = "15"; 102 - before = "17"; 103 - path = ../15; 104 - } 105 - { 106 - after = "16"; 107 - path = ../17; 108 - } 109 - ]; 110 - "compiler-rt/darwin-targetconditionals.patch" = [ 111 - { 112 - after = "13"; 113 - path = ../13; 114 - } 115 - ]; 116 - "compiler-rt/codesign.patch" = [ 117 - { 118 - after = "13"; 119 - path = ../13; 139 + path = ../18; 120 140 } 121 141 ]; 122 142 "compiler-rt/normalize-var.patch" = [ 123 143 { 124 - after = "16"; 125 - path = ../16; 126 - } 127 - { 128 - before = "16"; 129 - path = ../12; 130 - } 131 - ]; 132 - "lldb/procfs.patch" = [ 133 - { 134 - after = "15"; 135 - path = ../15; 136 - } 137 - { 138 - before = "15"; 139 - path = ../12; 140 - } 141 - ]; 142 - "lldb/resource-dir.patch" = [ 143 - { 144 - before = "16"; 145 - path = ../12; 146 - } 147 - ]; 148 - "llvm/no-pipes.patch" = [ 149 - { 150 - before = "16"; 151 - path = ../12; 144 + path = ../18; 152 145 } 153 146 ]; 154 147 "openmp/fix-find-tool.patch" = [ 155 148 { 156 - after = "17"; 157 149 before = "19"; 158 - path = ../17; 150 + path = ../18; 159 151 } 160 152 ]; 161 153 "openmp/run-lit-directly.patch" = [ 162 154 { 163 - after = "16"; 164 - path = ../16; 165 - } 166 - { 167 - after = "14"; 168 - before = "16"; 169 - path = ../14; 155 + path = ../18; 170 156 } 171 157 ]; 172 158 "libclc/use-default-paths.patch" = [ ··· 104 246 ]; 105 247 "libclc/gnu-install-dirs.patch" = [ 106 248 { 107 - after = "16"; 108 249 before = "21"; 109 - path = ../16; 250 + path = ../18; 110 251 } 111 252 { 112 253 after = "21";
+18 -34
pkgs/development/compilers/llvm/common/tblgen.nix
··· 38 38 39 39 src' = 40 40 if monorepoSrc != null then 41 - runCommand "${pname}-src-${version}" { } ( 42 - '' 43 - mkdir -p "$out" 44 - '' 45 - + lib.optionalString (lib.versionAtLeast release_version "14") '' 46 - cp -r ${monorepoSrc}/cmake "$out" 47 - cp -r ${monorepoSrc}/third-party "$out" 48 - '' 49 - + '' 50 - cp -r ${monorepoSrc}/llvm "$out" 51 - cp -r ${monorepoSrc}/clang "$out" 52 - cp -r ${monorepoSrc}/clang-tools-extra "$out" 53 - cp -r ${monorepoSrc}/mlir "$out" 54 - '' 55 - ) 41 + runCommand "${pname}-src-${version}" { } ('' 42 + mkdir -p "$out" 43 + cp -r ${monorepoSrc}/cmake "$out" 44 + cp -r ${monorepoSrc}/third-party "$out" 45 + cp -r ${monorepoSrc}/llvm "$out" 46 + cp -r ${monorepoSrc}/clang "$out" 47 + cp -r ${monorepoSrc}/clang-tools-extra "$out" 48 + cp -r ${monorepoSrc}/mlir "$out" 49 + '') 56 50 else 57 51 src; 58 52 ··· 54 60 targets = [ 55 61 "clang-tblgen" 56 62 "llvm-tblgen" 57 - ] 58 - ++ lib.optionals (lib.versionAtLeast release_version "15") [ 59 63 "clang-tidy-confusable-chars-gen" 60 - ] 61 - ++ lib.optionals (lib.versionAtLeast release_version "16") [ 62 64 "mlir-tblgen" 63 65 ] 64 - ++ 65 - lib.optionals ((lib.versionAtLeast release_version "15") && (lib.versionOlder release_version "20")) 66 - [ 67 - "clang-pseudo-gen" # Removed in LLVM 20 @ ed8f78827895050442f544edef2933a60d4a7935. 68 - ]; 66 + ++ lib.optionals (lib.versionOlder release_version "20") [ 67 + "clang-pseudo-gen" # Removed in LLVM 20 @ ed8f78827895050442f544edef2933a60d4a7935. 68 + ]; 69 69 70 70 self = stdenv.mkDerivation (finalAttrs: { 71 71 inherit pname version patches; ··· 93 105 cmakeFlags = [ 94 106 # Projects with tablegen-like tools. 95 107 "-DLLVM_ENABLE_PROJECTS=${ 96 - lib.concatStringsSep ";" ( 97 - [ 98 - "llvm" 99 - "clang" 100 - "clang-tools-extra" 101 - ] 102 - ++ lib.optionals (lib.versionAtLeast release_version "16") [ 103 - "mlir" 104 - ] 105 - ) 108 + lib.concatStringsSep ";" [ 109 + "llvm" 110 + "clang" 111 + "clang-tools-extra" 112 + "mlir" 113 + ] 106 114 }" 107 115 ] 108 116 ++ devExtraCmakeFlags;
-6
pkgs/development/compilers/llvm/default.nix
··· 22 22 }@packageSetArgs: 23 23 let 24 24 versions = { 25 - "12.0.1".officialRelease.sha256 = "08s5w2db9imb2yaqsvxs6pg21csi1cf6wa35rf8x6q07mam7j8qv"; 26 - "13.0.1".officialRelease.sha256 = "06dv6h5dmvzdxbif2s8njki6h32796v368dyb5945x8gjj72xh7k"; 27 - "14.0.6".officialRelease.sha256 = "sha256-vffu4HilvYwtzwgq+NlS26m65DGbp6OSSne2aje1yJE="; 28 - "15.0.7".officialRelease.sha256 = "sha256-wjuZQyXQ/jsmvy6y1aksCcEDXGBjuhpgngF3XQJ/T4s="; 29 - "16.0.6".officialRelease.sha256 = "sha256-fspqSReX+VD+Nl/Cfq+tDcdPtnQPV1IRopNDfd5VtUs="; 30 - "17.0.6".officialRelease.sha256 = "sha256-8MEDLLhocshmxoEBRSKlJ/GzJ8nfuzQ8qn0X/vLA+ag="; 31 25 "18.1.8".officialRelease.sha256 = "sha256-iiZKMRo/WxJaBXct9GdAcAT3cz9d9pnAcO1mmR6oPNE="; 32 26 "19.1.7".officialRelease.sha256 = "sha256-cZAB5vZjeTsXt9QHbP5xluWNQnAHByHtHnAhVDV0E6I="; 33 27 "20.1.8".officialRelease.sha256 = "sha256-ysyB/EYxi2qE9fD5x/F2zI4vjn8UDoo1Z9ukiIrjFGw=";
+5 -31
pkgs/development/compilers/llvm/update.sh
··· 20 20 21 21 readonly ATTRSET="llvmPackages_$VERSION_MAJOR" 22 22 23 - if [ "$VERSION_MAJOR" -ge "14" ]; then 24 - readonly SOURCES=( 25 - "llvm.monorepoSrc" 26 - ) 27 - elif [ "$VERSION_MAJOR" -eq "13" ]; then 28 - readonly SOURCES=( 29 - "llvm.src" 30 - ) 31 - else 32 - readonly SOURCES=( 33 - "clang-unwrapped.src" 34 - "compiler-rt.src" 35 - "clang-unwrapped.clang-tools-extra_src" 36 - "libcxx.src" 37 - "libcxxabi.src" 38 - "libunwind.src" 39 - "lld.src" 40 - "lldb.src" 41 - "llvm.src" 42 - "llvm.polly_src" 43 - "openmp.src" 44 - ) 45 - fi 46 - 47 - for SOURCE in "${SOURCES[@]}"; do 48 - echo "Updating the hash of $SOURCE:" 49 - declare ATTR="$ATTRSET.$SOURCE" 50 - declare OLD_HASH="$(nix --extra-experimental-features nix-command eval -f . $ATTR.outputHash)" 51 - declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\"" 52 - find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} + 53 - done 23 + echo "Updating the hash of llvm.monorepoSrc:" 24 + declare ATTR="$ATTRSET.llvm.monorepoSrc" 25 + declare OLD_HASH="$(nix --extra-experimental-features nix-command eval -f . $ATTR.outputHash)" 26 + declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\"" 27 + find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} + 54 28 55 29 echo OK
+22 -3
pkgs/development/compilers/mrustc/bootstrap.nix
··· 4 4 fetchurl, 5 5 mrustc, 6 6 mrustc-minicargo, 7 - llvm_12, 7 + #llvm_12, 8 8 libffi, 9 9 cmake, 10 10 perl, ··· 64 64 ]; 65 65 buildInputs = [ 66 66 # for rustc 67 - llvm_12 67 + #llvm_12 68 68 libffi 69 69 zlib 70 70 libxml2 ··· 76 76 # Use shared mrustc/minicargo/llvm instead of rebuilding them 77 77 "MRUSTC=${mrustc}/bin/mrustc" 78 78 #"MINICARGO=${mrustc-minicargo}/bin/minicargo" # FIXME: we need to rebuild minicargo locally so --manifest-overrides is applied 79 - "LLVM_CONFIG=${llvm_12.dev}/bin/llvm-config" 79 + #"LLVM_CONFIG=${llvm_12.dev}/bin/llvm-config" 80 80 "RUSTC_TARGET=${stdenv.targetPlatform.rust.rustcTarget}" 81 81 ]; 82 82 ··· 153 153 asl20 154 154 ]; 155 155 platforms = [ "x86_64-linux" ]; 156 + # rustc 1.54 only supports LLVM 12, which was removed from Nixpkgs. 157 + # mrustc can bootstrap up to rustc 1.74, which supported LLVM 17, 158 + # which has also been removed. 159 + # 160 + # 1.74 also shipped with the Cranelift backend, so perhaps that 161 + # could be used instead? Alternatively, it may be possible to 162 + # backport the upstream patches to support LLVM 18 to 1.74. 163 + # Assuming LLVM 18 is still in Nixpkgs by the time you read this 164 + # comment, anyway. But if not, then maybe mrustc has been updated 165 + # to support newer rustc versions? Hope springs eternal. 166 + # 167 + # (Note that you still have to “draw the rest of the owl” to 168 + # bootstrap the chain of rustc versions between this bootstrap 169 + # and the version currently used in Nixpkgs, anyway, so this was 170 + # already not useful for bootstrapping a Rust compiler for use with 171 + # Nixpkgs without a lot of additional work. See Guix’s Rust 172 + # bootstrap chain, or the non‐Rust minimal bootstrap in Guix and 173 + # Nixpkgs, for inspiration.) 174 + broken = true; 156 175 }; 157 176 }
+6 -1
pkgs/development/haskell-modules/with-packages-wrapper.nix
··· 182 182 + postBuild; 183 183 preferLocalBuild = true; 184 184 passthru = { 185 - inherit (ghc) version meta targetPrefix; 185 + inherit (ghc) version targetPrefix; 186 186 187 187 hoogle = hoogleWithPackages'; 188 188 ··· 202 202 203 203 Also note that withLLVM has been renamed to useLLVM for consistency with 204 204 the GHC Nix expressions.''; 205 + }; 206 + pos = __curPos; 207 + meta = ghc.meta // { 208 + # To be fixed by <https://github.com/NixOS/nixpkgs/pull/440774>. 209 + broken = useLLVM; 205 210 }; 206 211 }
+6 -6
pkgs/development/libraries/quarto/default.nix
··· 96 96 ''; 97 97 }; 98 98 99 - meta = with lib; { 99 + meta = { 100 100 description = "Open-source scientific and technical publishing system built on Pandoc"; 101 101 mainProgram = "quarto"; 102 102 longDescription = '' ··· 104 104 Quarto documents are authored using markdown, an easy to write plain text format. 105 105 ''; 106 106 homepage = "https://quarto.org/"; 107 - changelog = "https://github.com/quarto-dev/quarto-cli/releases/tag/v${version}"; 108 - license = licenses.gpl2Plus; 109 - maintainers = with maintainers; [ 107 + changelog = "https://github.com/quarto-dev/quarto-cli/releases/tag/v${final.version}"; 108 + license = lib.licenses.gpl2Plus; 109 + maintainers = with lib.maintainers; [ 110 110 minijackson 111 111 mrtarantoga 112 112 ]; 113 - platforms = platforms.all; 114 - sourceProvenance = with sourceTypes; [ 113 + platforms = lib.platforms.all; 114 + sourceProvenance = with lib.sourceTypes; [ 115 115 binaryNativeCode 116 116 binaryBytecode 117 117 ];
+65
pkgs/development/python-modules/doubles/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + pytest7CheckHook, 6 + setuptools, 7 + coverage, 8 + six, 9 + }: 10 + 11 + buildPythonPackage rec { 12 + pname = "doubles"; 13 + version = "1.5.3"; 14 + pyproject = true; 15 + 16 + src = fetchFromGitHub { 17 + owner = "uber"; 18 + repo = "doubles"; 19 + tag = "v${version}"; 20 + hash = "sha256-7yygZ00H2eIGuI/E0dh0j30hicJKBhCqyagY6XAJTCA="; 21 + }; 22 + 23 + build-system = [ 24 + setuptools 25 + ]; 26 + 27 + dependencies = [ 28 + coverage 29 + six 30 + ]; 31 + 32 + nativeCheckInputs = [ 33 + pytest7CheckHook 34 + ]; 35 + 36 + # To avoid a ValueError: Plugin already registered under a different name: 37 + # doubles.pytest_plugin 38 + pytestFlags = [ 39 + "-p" 40 + "no:doubles" 41 + ]; 42 + 43 + disabledTestPaths = [ 44 + # nose is deprecated 45 + "test/nose_test.py" 46 + 47 + # These tests fail due to an incompatibility between the doubles pytest plugin 48 + # and modern pytest versions (7+). The plugin's verification hook incorrectly 49 + # raises a generic `AssertionError` during teardown, instead of the specific 50 + # exceptions the negative test cases are designed to catch. 51 + "test/allow_test.py" 52 + "test/expect_test.py" 53 + "test/class_double_test.py" 54 + "test/object_double_test.py" 55 + ]; 56 + 57 + pythonImportsCheck = [ "doubles" ]; 58 + 59 + meta = { 60 + description = "Test doubles for Python"; 61 + homepage = "https://github.com/uber/doubles"; 62 + license = lib.licenses.mit; 63 + maintainers = with lib.maintainers; [ b-rodrigues ]; 64 + }; 65 + }
+5 -6
pkgs/development/python-modules/flask/default.nix
··· 20 20 python-dotenv, 21 21 22 22 # tests 23 - greenlet, 24 23 pytestCheckHook, 25 24 26 25 # reverse dependencies ··· 66 67 ; 67 68 }; 68 69 69 - meta = with lib; { 70 - changelog = "https://flask.palletsprojects.com/en/${versions.majorMinor version}.x/changes/#version-${ 71 - replaceStrings [ "." ] [ "-" ] version 70 + meta = { 71 + changelog = "https://flask.palletsprojects.com/en/stable/changes/#version-${ 72 + lib.replaceStrings [ "." ] [ "-" ] version 72 73 }"; 73 74 homepage = "https://flask.palletsprojects.com/"; 74 75 description = "Python micro framework for building web applications"; ··· 80 81 around Werkzeug and Jinja and has become one of the most popular 81 82 Python web application frameworks. 82 83 ''; 83 - license = licenses.bsd3; 84 - maintainers = with maintainers; [ nickcao ]; 84 + license = lib.licenses.bsd3; 85 + maintainers = with lib.maintainers; [ nickcao ]; 85 86 }; 86 87 }
+55
pkgs/development/python-modules/hydra-joblib-launcher/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + 6 + # build-system 7 + setuptools, 8 + 9 + # dependencies 10 + hydra-core, 11 + joblib, 12 + 13 + # test 14 + pytestCheckHook, 15 + }: 16 + 17 + buildPythonPackage rec { 18 + pname = "hydra-joblib-launcher"; 19 + pyproject = true; 20 + 21 + inherit (hydra-core) version src; 22 + 23 + sourceRoot = "${src.name}/plugins/hydra_joblib_launcher"; 24 + 25 + # get rid of deprecated "read_version" dependency, no longer in Nixpkgs: 26 + postPatch = '' 27 + substituteInPlace pyproject.toml --replace-fail ', "read-version"' "" 28 + substituteInPlace setup.py \ 29 + --replace-fail 'from read_version import read_version' "" \ 30 + --replace-fail 'version=read_version("hydra_plugins/hydra_joblib_launcher", "__init__.py"),' 'version="${version}",' 31 + ''; 32 + 33 + build-system = [ 34 + setuptools 35 + ]; 36 + 37 + dependencies = [ 38 + hydra-core 39 + joblib 40 + ]; 41 + 42 + nativeCheckInputs = [ 43 + pytestCheckHook 44 + ]; 45 + 46 + # tries to write to source directory otherwise: 47 + pytestFlagsArray = [ "-p no:cacheprovider" ]; 48 + 49 + meta = { 50 + inherit (hydra-core.meta) changelog license; 51 + description = "Hydra launcher supporting parallel execution based on Joblib.Parallel"; 52 + homepage = "https://hydra.cc/docs/plugins/joblib_launcher"; 53 + maintainers = with lib.maintainers; [ bcdarwin ]; 54 + }; 55 + }
+7 -4
pkgs/development/python-modules/motmetrics/default.nix
··· 17 17 pytest-benchmark, 18 18 }: 19 19 20 + let 21 + version = "1.4.0"; 22 + in 20 23 buildPythonPackage { 21 24 pname = "motmetrics"; 22 - version = "1.4.0-unstable-2025-01-14"; 25 + version = "${version}-unstable-2025-01-14"; 23 26 pyproject = true; 24 27 25 28 src = fetchFromGitHub { ··· 51 48 52 49 pythonImportsCheck = [ "motmetrics" ]; 53 50 54 - meta = with lib; { 51 + meta = { 55 52 description = "Benchmark multiple object trackers (MOT) in Python"; 56 53 homepage = "https://github.com/cheind/py-motmetrics"; 57 - changelog = "https://github.com/cheind/py-motmetrics/releases/tag/${version}"; 58 - license = licenses.mit; 54 + changelog = "https://github.com/cheind/py-motmetrics/releases/tag/v${version}"; 55 + license = lib.licenses.mit; 59 56 maintainers = [ ]; 60 57 }; 61 58 }
+3 -3
pkgs/development/python-modules/moyopy/default.nix
··· 16 16 17 17 buildPythonPackage rec { 18 18 pname = "moyopy"; 19 - version = "0.4.4"; 19 + version = "0.4.6"; 20 20 pyproject = true; 21 21 22 22 src = fetchFromGitHub { 23 23 owner = "spglib"; 24 24 repo = "moyo"; 25 25 tag = "v${version}"; 26 - hash = "sha256-TWZAqvtPeJqKXUFiNxD8H/aqjiDSWaTkMEQW0cuhEMY="; 26 + hash = "sha256-LMmPWE9XMj/DpsE2B9gZTqol/pG8a+RRYsLltBI/Kgc="; 27 27 }; 28 28 29 29 sourceRoot = "${src.name}/moyopy"; ··· 46 46 sourceRoot 47 47 cargoRoot 48 48 ; 49 - hash = "sha256-L4SAX4HWx+TSPQm7K6C5IEpFkx/AlscmKRs2wPEQun4="; 49 + hash = "sha256-A0rKr2Mn9cRiLO8UwnjhdDFSr4JpXQ2RNnASkpw/Rfg="; 50 50 }; 51 51 52 52 build-system = [
+6 -6
pkgs/development/python-modules/scikit-learn/default.nix
··· 123 123 124 124 pythonImportsCheck = [ "sklearn" ]; 125 125 126 - meta = with lib; { 126 + meta = { 127 127 description = "Set of python modules for machine learning and data mining"; 128 128 changelog = 129 129 let 130 - major = versions.major version; 131 - minor = versions.minor version; 132 - dashVer = replaceStrings [ "." ] [ "-" ] version; 130 + major = lib.versions.major version; 131 + minor = lib.versions.minor version; 132 + dashVer = lib.replaceStrings [ "." ] [ "-" ] version; 133 133 in 134 134 "https://scikit-learn.org/stable/whats_new/v${major}.${minor}.html#version-${dashVer}"; 135 135 homepage = "https://scikit-learn.org"; 136 - license = licenses.bsd3; 137 - maintainers = with maintainers; [ davhau ]; 136 + license = lib.licenses.bsd3; 137 + maintainers = with lib.maintainers; [ davhau ]; 138 138 }; 139 139 }
+4 -7
pkgs/development/python-modules/sphinx-version-warning/default.nix
··· 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 5 fetchpatch, 6 - pythonOlder, 7 6 setuptools, 8 7 sphinx, 9 8 sphinx-autoapi, ··· 20 21 pname = "sphinx-version-warning"; 21 22 version = "unstable-2019-08-10"; 22 23 pyproject = true; 23 - 24 - disabled = pythonOlder "3.7"; 25 24 26 25 outputs = [ 27 26 "out" ··· 60 63 61 64 pythonImportsCheck = [ "versionwarning" ]; 62 65 63 - meta = with lib; { 66 + meta = { 64 67 description = "Sphinx extension to show a warning banner at the top of your documentation"; 65 68 homepage = "https://github.com/humitos/sphinx-version-warning"; 66 - changelog = "https://github.com/humitos/sphinx-version-warning/blob/${version}/CHANGELOG.rst"; 67 - license = licenses.mit; 68 - maintainers = with maintainers; [ kaction ]; 69 + changelog = "https://github.com/humitos/sphinx-version-warning/blob/master/CHANGELOG.rst"; 70 + license = lib.licenses.mit; 71 + maintainers = with lib.maintainers; [ kaction ]; 69 72 }; 70 73 }
+2 -2
pkgs/development/python-modules/swift/default.nix
··· 24 24 25 25 buildPythonPackage rec { 26 26 pname = "swift"; 27 - version = "2.35.1"; 27 + version = "2.36.0"; 28 28 pyproject = true; 29 29 30 30 src = fetchPypi { 31 31 inherit pname version; 32 - hash = "sha256-1C0l2TlXoiFzxaZIAWz3h1cq8f11LcwGi3slpknimHU="; 32 + hash = "sha256-3qtd++4Xm6B9TPfKvx85s71/Hz8qFrhN+XR9TuvfHXw="; 33 33 }; 34 34 35 35 nativeBuildInputs = [ installShellFiles ];
+2 -3
pkgs/development/python-modules/textx/tests.nix
··· 1 1 { 2 - lib, 3 2 buildPythonPackage, 4 3 attrs, 5 4 click, ··· 49 50 "test_examples" # assertion error: 0 == 12 50 51 ]; 51 52 52 - meta = with lib; { 53 + meta = { 53 54 inherit (textx.meta) license maintainers; 54 55 description = "passthru.tests for textx"; 55 - homepage = textx.homepage + "tree/${version}/" + "tests/"; 56 + homepage = textx.homepage + "tree/${textx.version}/" + "tests/"; 56 57 }; 57 58 }
+33
pkgs/development/python-modules/types-regex/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + setuptools, 6 + }: 7 + 8 + buildPythonPackage rec { 9 + pname = "types-regex"; 10 + version = "2025.9.1.20250903"; 11 + pyproject = true; 12 + 13 + src = fetchPypi { 14 + pname = "types_regex"; 15 + inherit version; 16 + hash = "sha256-IwEW9ktcCLBhCdlQCG5V/ICbiipdE+gCGKx880+arIQ="; 17 + }; 18 + 19 + build-system = [ 20 + setuptools 21 + ]; 22 + 23 + pythonImportsCheck = [ 24 + "regex-stubs" 25 + ]; 26 + 27 + meta = { 28 + description = "Typing stubs for regex"; 29 + homepage = "https://github.com/python/typeshed"; 30 + license = lib.licenses.asl20; 31 + maintainers = with lib.maintainers; [ dwoffinden ]; 32 + }; 33 + }
+32
pkgs/development/python-modules/zenlog/default.nix
··· 1 + { 2 + buildPythonPackage, 3 + fetchPypi, 4 + lib, 5 + colorlog, 6 + setuptools, 7 + }: 8 + let 9 + pname = "zenlog"; 10 + version = "1.1"; 11 + in 12 + buildPythonPackage { 13 + inherit pname version; 14 + pyproject = true; 15 + 16 + src = fetchPypi { 17 + inherit pname version; 18 + hash = "sha256-g0YKhfpySbgAfANoGmoLV1zm/gRDSTidPT1D9Y1Gh94="; 19 + }; 20 + 21 + build-system = [ setuptools ]; 22 + 23 + dependencies = [ colorlog ]; 24 + 25 + meta = { 26 + description = "Python script logging for the lazy"; 27 + homepage = "https://github.com/ManufacturaInd/python-zenlog"; 28 + changelog = "https://github.com/ManufacturaInd/python-zenlog/releases/tag/v${version}"; 29 + license = lib.licenses.gpl3Only; 30 + maintainers = with lib.maintainers; [ S0AndS0 ]; 31 + }; 32 + }
-84
pkgs/development/tools/analysis/ikos/default.nix
··· 1 - { 2 - stdenv, 3 - lib, 4 - fetchFromGitHub, 5 - cmake, 6 - boost, 7 - tbb, 8 - gmp, 9 - llvm, 10 - clang, 11 - sqlite, 12 - python3, 13 - ocamlPackages, 14 - mpfr, 15 - ppl, 16 - doxygen, 17 - graphviz, 18 - }: 19 - 20 - stdenv.mkDerivation rec { 21 - pname = "ikos"; 22 - version = "3.5"; 23 - 24 - src = fetchFromGitHub { 25 - owner = "NASA-SW-VnV"; 26 - repo = "ikos"; 27 - rev = "v${version}"; 28 - hash = "sha256-kqgGD0plTW0N30kD7Y8xOvGODplJbi37Wh6yYAkzNKI="; 29 - }; 30 - 31 - nativeBuildInputs = [ 32 - cmake 33 - python3.pkgs.setuptools 34 - python3.pkgs.wheel 35 - python3.pkgs.build 36 - python3.pkgs.installer 37 - python3.pkgs.wrapPython 38 - ]; 39 - 40 - buildInputs = [ 41 - boost 42 - tbb 43 - gmp 44 - clang 45 - llvm 46 - sqlite 47 - python3 48 - ocamlPackages.apron 49 - mpfr 50 - ppl 51 - doxygen 52 - graphviz 53 - ]; 54 - 55 - propagatedBuildInputs = [ 56 - python3.pkgs.pygments 57 - ]; 58 - 59 - cmakeFlags = [ 60 - "-DAPRON_ROOT=${ocamlPackages.apron}" 61 - "-DINSTALL_PYTHON_VIRTUALENV=off" 62 - "-DPYTHON_VENV_EXECUTABLE=${python3}/bin/python" 63 - ]; 64 - 65 - postBuild = '' 66 - make doc 67 - ${python3}/bin/python -m build --no-isolation --outdir dist/ --wheel analyzer/python 68 - ''; 69 - 70 - postInstall = '' 71 - ${python3}/bin/python -m installer --prefix "$out" dist/*.whl 72 - ''; 73 - 74 - postFixup = '' 75 - wrapPythonPrograms 76 - ''; 77 - 78 - meta = with lib; { 79 - homepage = "https://github.com/NASA-SW-VnV/ikos"; 80 - description = "Static analyzer for C/C++ based on the theory of Abstract Interpretation"; 81 - license = licenses.nasa13; 82 - maintainers = with maintainers; [ atnnn ]; 83 - }; 84 - }
+3 -3
pkgs/servers/home-assistant/custom-lovelace-modules/custom-sidebar/package.nix
··· 47 47 48 48 passthru.entrypoint = "custom-sidebar-yaml.js"; 49 49 50 - meta = with lib; { 50 + meta = { 51 51 description = "Custom plugin that allows you to personalise the Home Assistant's sidebar per user or device basis"; 52 52 homepage = "https://elchininet.github.io/custom-sidebar"; 53 53 downloadPage = "https://github.com/elchininet/custom-sidebar"; 54 - changelog = "https://github.com/elchininet/custom-sidebar/releases/tag/v${version}"; 54 + changelog = "https://github.com/elchininet/custom-sidebar/releases/tag/v${finalAttrs.version}"; 55 55 license = lib.licenses.asl20; 56 - maintainers = with maintainers; [ kranzes ]; 56 + maintainers = with lib.maintainers; [ kranzes ]; 57 57 }; 58 58 })
+2 -7
pkgs/servers/sql/postgresql/ext/pgroonga.nix
··· 11 11 12 12 postgresqlBuildExtension (finalAttrs: { 13 13 pname = "pgroonga"; 14 - version = "4.0.1"; 14 + version = "4.0.2"; 15 15 16 16 src = fetchFromGitHub { 17 17 owner = "pgroonga"; 18 18 repo = "pgroonga"; 19 19 tag = "${finalAttrs.version}"; 20 - hash = "sha256-a5nNtlUiFBuuqWAjIN0gU/FaoV3VpJh+/fab8R/77dw="; 20 + hash = "sha256-hZy2qDI9bNFvcm7SbCMZxixPEXgPmjmeEOM4VoXKttE="; 21 21 }; 22 22 23 23 nativeBuildInputs = [ pkg-config ]; ··· 34 34 ]; 35 35 36 36 meta = { 37 - # PostgreSQL 18 support issue upstream: https://github.com/pgroonga/pgroonga/issues/708 38 - # Check after next package update. 39 - broken = lib.warnIf ( 40 - finalAttrs.version != "4.0.1" 41 - ) "Is postgresql18Packages.pgroonga still broken?" (lib.versionAtLeast postgresql.version "18"); 42 37 description = "PostgreSQL extension to use Groonga as the index"; 43 38 longDescription = '' 44 39 PGroonga is a PostgreSQL extension to use Groonga as the index.
+6
pkgs/test/default.nix
··· 16 16 (filter (n: n != "llvmPackages_9")) 17 17 (filter (n: n != "llvmPackages_10")) 18 18 (filter (n: n != "llvmPackages_11")) 19 + (filter (n: n != "llvmPackages_12")) 20 + (filter (n: n != "llvmPackages_13")) 21 + (filter (n: n != "llvmPackages_14")) 22 + (filter (n: n != "llvmPackages_15")) 23 + (filter (n: n != "llvmPackages_16")) 24 + (filter (n: n != "llvmPackages_17")) 19 25 ]; 20 26 tests = lib.genAttrs pkgSets ( 21 27 name:
+64 -18
pkgs/top-level/aliases.nix
··· 516 516 beatsabermodmanager = throw "'beatsabermodmanager' has been removed due to lack of upstream maintainenance. Consider using 'bs-manager' instead"; # Added 2025-03-18 517 517 betterbird = throw "betterbird has been removed as there were insufficient maintainer resources to keep up with security updates"; # Added 2024-10-25 518 518 betterbird-unwrapped = throw "betterbird has been removed as there were insufficient maintainer resources to keep up with security updates"; # Added 2024-10-25 519 + bfc = throw "bfc has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10 519 520 bibata-extra-cursors = throw "bibata-cursors has been removed as it was broken"; # Added 2024-07-15 520 521 bitbucket-server-cli = throw "bitbucket-server-cli has been removed due to lack of maintenance upstream."; # Added 2025-05-27 521 522 bitcoin-abc = throw "bitcoin-abc has been removed due to a lack of maintanance"; # Added 2025-06-17 ··· 642 641 colloid-kde = throw "'colloid-kde' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20 643 642 colorpicker = throw "'colorpicker' has been removed due to lack of maintenance upstream. Consider using 'xcolor', 'gcolor3', 'eyedropper' or 'gpick' instead"; # Added 2024-10-19 644 643 colorstorm = throw "'colorstorm' has been removed because it was unmaintained in nixpkgs and upstream was rewritten."; # Added 2025-06-15 644 + cone = throw "cone has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10 645 645 connman-ncurses = throw "'connman-ncurses' has been removed due to lack of maintenance upstream."; # Added 2025-05-27 646 646 copilot-language-server-fhs = lib.warnOnInstantiate "The package set `copilot-language-server-fhs` has been renamed to `copilot-language-server`." copilot-language-server; # Added 2025-09-07 647 647 copper = throw "'copper' has been removed, as it was broken since 22.11"; # Added 2025-08-22 ··· 701 699 cyber = throw "cyber has been removed, as it does not build with supported Zig versions"; # Added 2025-08-09 702 700 703 701 # these are for convenience, not for backward compat., and shouldn't expire until the package is deprecated. 704 - clang9Stdenv = throw "clang9Stdenv has been removed from nixpkgs"; # Added 2024-04-08 705 - clang12Stdenv = lowPrio llvmPackages_12.stdenv; # preserve, reason: see above 706 - clang13Stdenv = lowPrio llvmPackages_13.stdenv; # preserve, reason: see above 707 - clang14Stdenv = lowPrio llvmPackages_14.stdenv; # preserve, reason: see above 708 - clang15Stdenv = lowPrio llvmPackages_15.stdenv; # preserve, reason: see above 709 - clang16Stdenv = lowPrio llvmPackages_16.stdenv; # preserve, reason: see above 710 - clang17Stdenv = lowPrio llvmPackages_17.stdenv; # preserve, reason: see above 711 702 clang18Stdenv = lowPrio llvmPackages_18.stdenv; # preserve, reason: see above 712 703 clang19Stdenv = lowPrio llvmPackages_19.stdenv; # preserve, reason: see above 713 704 714 - clang-tools_9 = throw "clang-tools_9 has been removed from nixpkgs"; # Added 2024-04-08 715 - clang_9 = throw "clang_9 has been removed from nixpkgs"; # Added 2024-04-08 716 - 717 - clang-tools_12 = llvmPackages_12.clang-tools; # Added 2024-04-22 718 - clang-tools_13 = llvmPackages_13.clang-tools; # Added 2024-04-22 719 - clang-tools_14 = llvmPackages_14.clang-tools; # Added 2024-04-22 720 - clang-tools_15 = llvmPackages_15.clang-tools; # Added 2024-04-22 721 - clang-tools_16 = llvmPackages_16.clang-tools; # Added 2024-04-22 722 - clang-tools_17 = llvmPackages_17.clang-tools; # Added 2024-04-22 723 705 clang-tools_18 = llvmPackages_18.clang-tools; # Added 2024-04-22 724 706 clang-tools_19 = llvmPackages_19.clang-tools; # Added 2024-08-21 725 707 ··· 712 726 713 727 ### D ### 714 728 729 + dale = throw "dale has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10 715 730 dap = throw "'dap' has been removed because it doesn't compile and has been unmaintained since 2014"; # Added 2025-05-10 716 731 daq = throw "'daq' has been removed as it is unmaintained and broken. Snort2 has also been removed, which depended on this"; # Added 2025-05-21 717 732 darling = throw "'darling' has been removed due to vendoring Python2"; # Added 2025-05-10 ··· 1148 1161 hiddify-app = throw "hiddify-app has been removed, since it is unmaintained"; # added 2025-08-20 1149 1162 hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21 1150 1163 hoarder = throw "'hoarder' has been renamed to 'karakeep'"; # Added 2025-04-21 1164 + hobbes = throw "hobbes has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-20 1151 1165 hmetis = throw "'hmetis' has been removed as it was unmaintained and the upstream was unavailable"; # Added 2025-05-05 1152 1166 hop-cli = throw "hop-cli has been removed as the service has been shut-down"; # Added 2024-08-13 1153 1167 hpp-fcl = coal; # Added 2024-11-15 ··· 1170 1182 ib-controller = throw "ib-controller has been removed from nixpkgs as it was broken"; # Added 2024-07-15 1171 1183 ibm-sw-tpm2 = throw "ibm-sw-tpm2 has been removed, as it was broken"; # Added 2025-08-25 1172 1184 icuReal = throw "icuReal has been removed from nixpkgs as a mistake"; # Added 2025-02-18 1185 + ikos = throw "ikos has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10 1173 1186 imagemagick7Big = throw "'imagemagick7Big' has been renamed to/replaced by 'imagemagickBig'"; # Converted to throw 2024-10-17 1174 1187 imagemagick7 = throw "'imagemagick7' has been renamed to/replaced by 'imagemagick'"; # Converted to throw 2024-10-17 1175 1188 imagemagick7_light = throw "'imagemagick7_light' has been renamed to/replaced by 'imagemagick_light'"; # Converted to throw 2024-10-17 ··· 1472 1483 1473 1484 llvmPackages_git = (callPackages ../development/compilers/llvm { }).git; # Added 2024-08-02 1474 1485 1475 - lld_9 = throw "lld_9 has been removed from nixpkgs"; # Added 2024-04-08 1476 - lldb_9 = throw "lldb_9 has been removed from nixpkgs"; # Added 2024-04-08 1477 1486 llvmPackages_9 = throw "llvmPackages_9 has been removed from nixpkgs"; # Added 2024-04-08 1478 1487 llvm_9 = throw "llvm_9 has been removed from nixpkgs"; # Added 2024-04-08 1488 + lld_9 = throw "lld_9 has been removed from nixpkgs"; # Added 2024-04-08 1489 + lldb_9 = throw "lldb_9 has been removed from nixpkgs"; # Added 2024-04-08 1490 + clang_9 = throw "clang_9 has been removed from nixpkgs"; # Added 2024-04-08 1491 + clang9Stdenv = throw "clang9Stdenv has been removed from nixpkgs"; # Added 2024-04-08 1492 + clang-tools_9 = throw "clang-tools_9 has been removed from nixpkgs"; # Added 2024-04-08 1493 + 1494 + llvmPackages_12 = throw "llvmPackages_12 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1495 + llvm_12 = throw "llvm_12 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1496 + lld_12 = throw "lld_12 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1497 + lldb_12 = throw "lldb_12 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1498 + clang_12 = throw "clang_12 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1499 + clang12Stdenv = throw "clang12Stdenv has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1500 + clang-tools_12 = throw "clang-tools_12 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1501 + 1502 + llvmPackages_13 = throw "llvmPackages_13 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1503 + llvm_13 = throw "llvm_13 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1504 + lld_13 = throw "lld_13 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1505 + lldb_13 = throw "lldb_13 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1506 + clang_13 = throw "clang_13 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1507 + clang13Stdenv = throw "clang13Stdenv has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1508 + clang-tools_13 = throw "clang-tools_13 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1509 + 1510 + llvmPackages_14 = throw "llvmPackages_14 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1511 + llvm_14 = throw "llvm_14 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1512 + lld_14 = throw "lld_14 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1513 + lldb_14 = throw "lldb_14 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1514 + clang_14 = throw "clang_14 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1515 + clang14Stdenv = throw "clang14Stdenv has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1516 + clang-tools_14 = throw "clang-tools_14 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-10 1517 + 1518 + llvmPackages_15 = throw "llvmPackages_15 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1519 + llvm_15 = throw "llvm_15 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1520 + lld_15 = throw "lld_15 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1521 + lldb_15 = throw "lldb_15 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1522 + clang_15 = throw "clang_15 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1523 + clang15Stdenv = throw "clang15Stdenv has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1524 + clang-tools_15 = throw "clang-tools_15 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-12 1525 + 1526 + llvmPackages_16 = throw "llvmPackages_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1527 + llvm_16 = throw "llvm_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1528 + lld_16 = throw "lld_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1529 + lldb_16 = throw "lldb_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1530 + mlir_16 = throw "mlir_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1531 + clang_16 = throw "clang_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1532 + clang16Stdenv = throw "clang16Stdenv has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1533 + clang-tools_16 = throw "clang-tools_16 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1534 + 1535 + llvmPackages_17 = throw "llvmPackages_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1536 + llvm_17 = throw "llvm_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1537 + lld_17 = throw "lld_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1538 + lldb_17 = throw "lldb_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1539 + mlir_17 = throw "mlir_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1540 + clang_17 = throw "clang_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1541 + clang17Stdenv = throw "clang17Stdenv has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1542 + clang-tools_17 = throw "clang-tools_17 has been removed, as it is unmaintained and obsolete"; # Added 2025-08-09 1479 1543 1480 1544 lobster-two = throw "'lobster-two' has been renamed to/replaced by 'google-fonts'"; # Converted to throw 2024-10-17 1481 1545 loc = throw "'loc' has been removed due to lack of upstream maintenance. Consider 'tokei' as an alternative."; # Added 2025-01-25 ··· 1703 1661 mpdWithFeatures = lib.warnOnInstantiate "mpdWithFeatures has been replaced by mpd.override" mpd.override; # Added 2025-08-08 1704 1662 mpdevil = plattenalbum; # Added 2024-05-22 1705 1663 mpg321 = throw "'mpg321' has been removed due to it being unmaintained by upstream. Consider using mpg123 instead."; # Added 2024-05-10 1664 + mpris-discord-rpc = throw "'mpris-discord-rpc' has been renamed to 'music-discord-rpc'."; # Added 2025-09-14 1706 1665 mq-cli = throw "'mq-cli' has been removed due to lack of upstream maintenance"; # Added 2025-01-25 1707 1666 mrkd = throw "'mrkd' has been removed as it is unmaintained since 2021"; # Added 2024-12-21 1708 1667 msp430NewlibCross = msp430Newlib; # Added 2024-09-06 ··· 1844 1801 oauth2_proxy = throw "'oauth2_proxy' has been renamed to/replaced by 'oauth2-proxy'"; # Converted to throw 2024-10-17 1845 1802 obliv-c = throw "obliv-c has been removed from Nixpkgs, as it has been unmaintained upstream for 4 years and does not build with supported GCC versions"; # Added 2025-08-18 1846 1803 ocis-bin = throw "ocis-bin has been renamed to ocis_5-bin'. Future major.minor versions will be made available as separate packages"; # Added 2025-03-30 1804 + oclgrind = throw "oclgrind has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10 1847 1805 odoo15 = throw "odoo15 has been removed from nixpkgs as it is unsupported; migrate to a newer version of odoo"; # Added 2025-05-06 1848 1806 offrss = throw "offrss has been removed due to lack of upstream maintenance; consider using another rss reader"; # Added 2025-06-01 1849 1807 oil = lib.warnOnInstantiate "Oil has been replaced with the faster native C++ version and renamed to 'oils-for-unix'. See also https://github.com/oils-for-unix/oils/wiki/Oils-Deployments" oils-for-unix; # Added 2024-10-22 ··· 2120 2076 qcachegrind = throw "'qcachegrind' has been removed, as it depends on KDE Gear 5, which has reached EOL"; # Added 2025-08-20 2121 2077 qflipper = qFlipper; # Added 2022-02-11 2122 2078 qnial = throw "'qnial' has been removed due to failing to build and being unmaintained"; # Added 2025-06-26 2079 + qrscan = throw "qrscan has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-19 2123 2080 qscintilla = libsForQt5.qscintilla; # Added 2023-09-20 2124 2081 qscintilla-qt6 = qt6Packages.qscintilla; # Added 2023-09-20 2125 2082 qt-video-wlr = throw "'qt-video-wlr' has been removed, as it depends on KDE Gear 5, which has reached EOL"; # Added 2025-08-20 ··· 2568 2523 ### W ### 2569 2524 w_scan = throw "'w_scan' has been removed due to lack of upstream maintenance"; # Added 2025-08-29 2570 2525 wakatime = wakatime-cli; # 2024-05-30 2526 + wavm = throw "wavm has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10 2571 2527 wal_e = throw "wal_e was removed as it is unmaintained upstream and depends on the removed boto package; upstream recommends using wal-g or pgbackrest"; # Added 2024-09-22 2572 2528 wapp = tclPackages.wapp; # Added 2024-10-02 2573 2529 wavebox = throw "'wavebox' has been removed due to lack of maintenance in nixpkgs"; # Added 2025-06-24
+1 -56
pkgs/top-level/all-packages.nix
··· 2605 2605 2606 2606 compass = callPackage ../development/tools/compass { }; 2607 2607 2608 - cone = callPackage ../development/compilers/cone { 2609 - llvmPackages = llvmPackages_13; 2610 - }; 2611 - 2612 2608 coreutils = callPackage ../tools/misc/coreutils { }; 2613 2609 2614 2610 # The coreutils above are built with dependencies from ··· 4625 4629 clang-manpages = llvmPackages.clang-manpages; 4626 4630 4627 4631 clang = llvmPackages.clang; 4628 - clang_12 = llvmPackages_12.clang; 4629 - clang_13 = llvmPackages_13.clang; 4630 - clang_14 = llvmPackages_14.clang; 4631 - clang_15 = llvmPackages_15.clang; 4632 - clang_16 = llvmPackages_16.clang; 4633 - clang_17 = llvmPackages_17.clang; 4634 4632 4635 4633 clang-tools = llvmPackages.clang-tools; 4636 4634 ··· 4714 4724 flutter327 = flutterPackages.v3_27; 4715 4725 flutter324 = flutterPackages.v3_24; 4716 4726 4717 - fpc = callPackage ../development/compilers/fpc { 4718 - # https://github.com/NixOS/nixpkgs/issues/416485 4719 - # TODO: remove when upstream issue is fixed: 4720 - # https://gitlab.com/freepascal.org/fpc/source/-/issues/41045 4721 - stdenv = 4722 - if stdenv.cc.isClang && stdenv.hostPlatform.isx86_64 then llvmPackages_17.stdenv else stdenv; 4723 - }; 4727 + fpc = callPackage ../development/compilers/fpc { }; 4724 4728 4725 4729 gambit = callPackage ../development/compilers/gambit { }; 4726 4730 gambit-unstable = callPackage ../development/compilers/gambit/unstable.nix { }; ··· 5351 5367 }; 5352 5368 5353 5369 lld = llvmPackages.lld; 5354 - lld_12 = llvmPackages_12.lld; 5355 - lld_13 = llvmPackages_13.lld; 5356 - lld_14 = llvmPackages_14.lld; 5357 - lld_15 = llvmPackages_15.lld; 5358 - lld_16 = llvmPackages_16.lld; 5359 - lld_17 = llvmPackages_17.lld; 5360 5370 5361 5371 lldb = llvmPackages.lldb; 5362 - lldb_12 = llvmPackages_12.lldb; 5363 - lldb_13 = llvmPackages_13.lldb; 5364 - lldb_14 = llvmPackages_14.lldb; 5365 - lldb_15 = llvmPackages_15.lldb; 5366 - lldb_16 = llvmPackages_16.lldb; 5367 - lldb_17 = llvmPackages_17.lldb; 5368 5372 5369 5373 llvm = llvmPackages.llvm; 5370 - llvm_12 = llvmPackages_12.llvm; 5371 - llvm_13 = llvmPackages_13.llvm; 5372 - llvm_14 = llvmPackages_14.llvm; 5373 - llvm_15 = llvmPackages_15.llvm; 5374 - llvm_16 = llvmPackages_16.llvm; 5375 - llvm_17 = llvmPackages_17.llvm; 5376 - 5377 - mlir_16 = llvmPackages_16.mlir; 5378 - mlir_17 = llvmPackages_17.mlir; 5379 5374 flang = llvmPackages_20.flang; 5380 5375 5381 5376 libclc = llvmPackages.libclc; ··· 5366 5403 inherit 5367 5404 (rec { 5368 5405 llvmPackagesSet = recurseIntoAttrs (callPackages ../development/compilers/llvm { }); 5369 - 5370 - llvmPackages_12 = llvmPackagesSet."12"; 5371 - llvmPackages_13 = llvmPackagesSet."13"; 5372 - llvmPackages_14 = llvmPackagesSet."14"; 5373 - llvmPackages_15 = llvmPackagesSet."15"; 5374 - llvmPackages_16 = llvmPackagesSet."16"; 5375 - llvmPackages_17 = llvmPackagesSet."17"; 5376 5406 5377 5407 llvmPackages_18 = llvmPackagesSet."18"; 5378 5408 clang_18 = llvmPackages_18.clang; ··· 5398 5442 5399 5443 mkLLVMPackages = llvmPackagesSet.mkPackage; 5400 5444 }) 5401 - llvmPackages_12 5402 - llvmPackages_13 5403 - llvmPackages_14 5404 - llvmPackages_15 5405 - llvmPackages_16 5406 - llvmPackages_17 5407 5445 llvmPackages_18 5408 5446 clang_18 5409 5447 lld_18 ··· 6810 6860 iaca_2_1 = callPackage ../development/tools/iaca/2.1.nix { }; 6811 6861 iaca_3_0 = callPackage ../development/tools/iaca/3.0.nix { }; 6812 6862 iaca = iaca_3_0; 6813 - 6814 - ikos = callPackage ../development/tools/analysis/ikos { 6815 - inherit (llvmPackages_14) stdenv clang llvm; 6816 - tbb = tbb_2022; 6817 - }; 6818 6863 6819 6864 include-what-you-use = callPackage ../development/tools/analysis/include-what-you-use { 6820 6865 llvmPackages = llvmPackages_20;
+13 -28
pkgs/top-level/haskell-packages.nix
··· 48 48 # Use this rather than `rec { ... }` below for sake of overlays. 49 49 inherit (pkgs.haskell) compiler packages; 50 50 51 + buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_20; 52 + llvmPackages = pkgs.llvmPackages_20; 53 + 51 54 in 52 55 { 53 56 lib = haskellLibUncomposable; ··· 75 72 { 76 73 # Required to bootstrap 9.4.8. 77 74 ghc902Binary = callPackage ../development/compilers/ghc/9.0.2-binary.nix { 78 - llvmPackages = pkgs.llvmPackages_20; 75 + inherit llvmPackages; 79 76 }; 80 77 81 78 ghc924Binary = callPackage ../development/compilers/ghc/9.2.4-binary.nix { }; ··· 94 91 # https://github.com/xattr/xattr/issues/44 and 95 92 # https://github.com/xattr/xattr/issues/55 are solved. 96 93 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 97 - # Support range >= 10 && < 14 98 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; 99 - llvmPackages = pkgs.llvmPackages_12; 94 + inherit buildTargetLlvmPackages llvmPackages; 100 95 }; 101 96 ghc94 = compiler.ghc948; 102 97 ghc963 = callPackage ../development/compilers/ghc/9.6.3.nix { ··· 104 103 # https://github.com/xattr/xattr/issues/44 and 105 104 # https://github.com/xattr/xattr/issues/55 are solved. 106 105 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 107 - # Support range >= 11 && < 16 108 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; 109 - llvmPackages = pkgs.llvmPackages_15; 106 + inherit buildTargetLlvmPackages llvmPackages; 110 107 }; 111 108 ghc967 = callPackage ../development/compilers/ghc/9.6.7.nix { 112 109 bootPkgs = bb.packages.ghc924Binary; ··· 113 114 # https://github.com/xattr/xattr/issues/44 and 114 115 # https://github.com/xattr/xattr/issues/55 are solved. 115 116 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 116 - # Support range >= 11 && < 16 117 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; 118 - llvmPackages = pkgs.llvmPackages_15; 117 + inherit buildTargetLlvmPackages llvmPackages; 119 118 }; 120 119 ghc96 = compiler.ghc967; 121 120 ghc984 = callPackage ../development/compilers/ghc/9.8.4.nix { ··· 127 130 # https://github.com/xattr/xattr/issues/44 and 128 131 # https://github.com/xattr/xattr/issues/55 are solved. 129 132 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 130 - # Support range >= 11 && < 16 131 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; 132 - llvmPackages = pkgs.llvmPackages_15; 133 + inherit buildTargetLlvmPackages llvmPackages; 133 134 }; 134 135 ghc98 = compiler.ghc984; 135 136 ghc9101 = callPackage ../development/compilers/ghc/9.10.1.nix { ··· 146 151 # https://github.com/xattr/xattr/issues/44 and 147 152 # https://github.com/xattr/xattr/issues/55 are solved. 148 153 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 149 - # 2023-01-15: Support range >= 11 && < 16 150 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; 151 - llvmPackages = pkgs.llvmPackages_15; 154 + inherit buildTargetLlvmPackages llvmPackages; 152 155 }; 153 156 ghc9102 = callPackage ../development/compilers/ghc/9.10.2.nix { 154 157 bootPkgs = ··· 164 171 # https://github.com/xattr/xattr/issues/44 and 165 172 # https://github.com/xattr/xattr/issues/55 are solved. 166 173 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 167 - # 2023-01-15: Support range >= 11 && < 16 168 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15; 169 - llvmPackages = pkgs.llvmPackages_15; 174 + inherit buildTargetLlvmPackages llvmPackages; 170 175 }; 171 176 ghc9103 = callPackage ../development/compilers/ghc/9.10.3.nix { 172 177 bootPkgs = ··· 196 205 # https://github.com/xattr/xattr/issues/44 and 197 206 # https://github.com/xattr/xattr/issues/55 are solved. 198 207 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 199 - # 2024-12-21: Support range >= 13 && < 20 200 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_19; 201 - llvmPackages = pkgs.llvmPackages_19; 208 + inherit buildTargetLlvmPackages llvmPackages; 202 209 }; 203 210 ghc9122 = callPackage ../development/compilers/ghc/9.12.2.nix { 204 211 bootPkgs = ··· 207 218 # https://github.com/xattr/xattr/issues/44 and 208 219 # https://github.com/xattr/xattr/issues/55 are solved. 209 220 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 210 - # 2024-12-21: Support range >= 13 && < 20 211 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_19; 212 - llvmPackages = pkgs.llvmPackages_19; 221 + inherit buildTargetLlvmPackages llvmPackages; 213 222 }; 214 223 ghc912 = compiler.ghc9122; 215 224 ghcHEAD = callPackage ../development/compilers/ghc/head.nix { ··· 217 230 # https://github.com/xattr/xattr/issues/44 and 218 231 # https://github.com/xattr/xattr/issues/55 are solved. 219 232 inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 220 - # 2023-01-15: Support range >= 11 && < 16 221 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_18; 222 - llvmPackages = pkgs.llvmPackages_18; 233 + inherit buildTargetLlvmPackages llvmPackages; 223 234 }; 224 235 225 236 # Starting from GHC 9, integer-{simple,gmp} is replaced by ghc-bignum
+8
pkgs/top-level/python-packages.nix
··· 4356 4356 4357 4357 doubleratchet = callPackage ../development/python-modules/doubleratchet { }; 4358 4358 4359 + doubles = callPackage ../development/python-modules/doubles { }; 4360 + 4359 4361 dowhen = callPackage ../development/python-modules/dowhen { }; 4360 4362 4361 4363 downloader-cli = callPackage ../development/python-modules/downloader-cli { }; ··· 6855 6853 hy = callPackage ../development/python-modules/hy { }; 6856 6854 6857 6855 hydra-core = callPackage ../development/python-modules/hydra-core { }; 6856 + 6857 + hydra-joblib-launcher = callPackage ../development/python-modules/hydra-joblib-launcher { }; 6858 6858 6859 6859 hydrawiser = callPackage ../development/python-modules/hydrawiser { }; 6860 6860 ··· 19308 19304 19309 19305 types-redis = callPackage ../development/python-modules/types-redis { }; 19310 19306 19307 + types-regex = callPackage ../development/python-modules/types-regex { }; 19308 + 19311 19309 types-requests = callPackage ../development/python-modules/types-requests { }; 19312 19310 19313 19311 types-retry = callPackage ../development/python-modules/types-retry { }; ··· 20474 20468 zeep = callPackage ../development/python-modules/zeep { }; 20475 20469 20476 20470 zeitgeist = (toPythonModule (pkgs.zeitgeist.override { python3 = python; })).py; 20471 + 20472 + zenlog = callPackage ../development/python-modules/zenlog { }; 20477 20473 20478 20474 zenoh = callPackage ../development/python-modules/zenoh { }; 20479 20475