mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
Merge staging-next into staging
This commit is contained in:
commit
264b97ec67
2
.github/labeler.yml
vendored
2
.github/labeler.yml
vendored
|
|
@ -393,7 +393,7 @@
|
|||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- nixos/modules/services/desktops/pantheon/**/*
|
||||
- nixos/modules/services/x11/desktop-managers/pantheon.nix
|
||||
- nixos/modules/services/desktop-managers/pantheon.nix
|
||||
- nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
|
||||
- nixos/tests/pantheon.nix
|
||||
- pkgs/desktops/pantheon/**/*
|
||||
|
|
|
|||
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
steps:
|
||||
# Use a GitHub App to create the PR so that CI gets triggered
|
||||
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
|
|
|
|||
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
|
@ -109,7 +109,7 @@ jobs:
|
|||
- name: Build codeowners validator
|
||||
run: nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A codeownersValidator
|
||||
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
if: github.event_name == 'pull_request_target' && vars.OWNER_RO_APP_ID
|
||||
id: app-token
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/edited.yml
vendored
2
.github/workflows/edited.yml
vendored
|
|
@ -36,7 +36,7 @@ jobs:
|
|||
# Use a GitHub App to create the PR so that CI gets triggered
|
||||
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
|
||||
# We only need Pull Requests: write here, but the app is also used for backports.
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
|
|
|
|||
2
.github/workflows/labels.yml
vendored
2
.github/workflows/labels.yml
vendored
|
|
@ -49,7 +49,7 @@ jobs:
|
|||
run: npm install @actions/artifact bottleneck
|
||||
|
||||
# Use a GitHub App, because it has much higher rate limits: 12,500 instead of 5,000 req / hour.
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_APP_ID
|
||||
id: app-token
|
||||
with:
|
||||
|
|
|
|||
2
.github/workflows/periodic-merge.yml
vendored
2
.github/workflows/periodic-merge.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
steps:
|
||||
# Use a GitHub App to create the PR so that CI gets triggered
|
||||
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
|
|
|
|||
2
.github/workflows/reviewers.yml
vendored
2
.github/workflows/reviewers.yml
vendored
|
|
@ -48,7 +48,7 @@ jobs:
|
|||
# - OWNER_APP_PRIVATE_KEY (secret)
|
||||
#
|
||||
# Can't use the token received from permissions above, because it can't get enough permissions.
|
||||
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
|
||||
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
if: github.event_name == 'pull_request_target' && vars.OWNER_APP_ID
|
||||
id: app-token
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
- GCC 9, 10, 11, and 12 have been removed, as they have reached end‐of‐life upstream and are no longer supported.
|
||||
|
||||
- LLVM 12, 13, 14, 15, 16, and 17 have been removed, as they have reached end‐of‐life upstream and are no longer supported.
|
||||
|
||||
- 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.
|
||||
|
||||
- GHC 8.6, 8.10, 9.0, 9.2, and their package sets have been removed.
|
||||
|
|
|
|||
|
|
@ -7103,6 +7103,14 @@
|
|||
githubId = 2025623;
|
||||
name = "Luc Chabassier";
|
||||
};
|
||||
dwoffinden = {
|
||||
email = "daw@hey.com";
|
||||
github = "dwoffinden";
|
||||
githubId = 1432131;
|
||||
keys = [ { fingerprint = "46FC 889E BC38 100E 51E8 3245 F3EA 503B 360F BD40"; } ];
|
||||
matrix = "@dwoffinden:matrix.org";
|
||||
name = "Daniel Woffinden";
|
||||
};
|
||||
dwrege = {
|
||||
email = "email@dwrege.de";
|
||||
github = "DominicWrege";
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- 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.
|
||||
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
- 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`.
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,8 @@
|
|||
|
||||
- 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.
|
||||
|
||||
- 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.
|
||||
|
||||
- `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server.
|
||||
|
||||
- `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.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Pantheon is the desktop environment created for the elementary OS distribution.
|
|||
|
||||
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
|
||||
```nix
|
||||
{ services.xserver.desktopManager.pantheon.enable = true; }
|
||||
{ services.desktopManager.pantheon.enable = true; }
|
||||
```
|
||||
This automatically enables LightDM and Pantheon's LightDM greeter. If you'd like to disable this, set
|
||||
```nix
|
||||
|
|
@ -25,8 +25,8 @@ You can also use [](#opt-environment.pantheon.excludePackages) to remove any oth
|
|||
|
||||
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:
|
||||
|
||||
- [](#opt-services.xserver.desktopManager.pantheon.extraWingpanelIndicators)
|
||||
- [](#opt-services.xserver.desktopManager.pantheon.extraSwitchboardPlugs)
|
||||
- [](#opt-services.desktopManager.pantheon.extraWingpanelIndicators)
|
||||
- [](#opt-services.desktopManager.pantheon.extraSwitchboardPlugs)
|
||||
|
||||
to configure the programs with plugs or indicators.
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
cfg = config.services.xserver.desktopManager.pantheon;
|
||||
cfg = config.services.desktopManager.pantheon;
|
||||
serviceCfg = config.services.pantheon;
|
||||
|
||||
nixos-gsettings-desktop-schemas = pkgs.pantheon.elementary-gsettings-schemas.override {
|
||||
|
|
@ -28,6 +28,13 @@ in
|
|||
maintainers = teams.pantheon.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "xserver" "desktopManager" "pantheon" ]
|
||||
[ "services" "desktopManager" "pantheon" ]
|
||||
)
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
services.pantheon = {
|
||||
|
|
@ -40,7 +47,7 @@ in
|
|||
|
||||
};
|
||||
|
||||
services.xserver.desktopManager.pantheon = {
|
||||
services.desktopManager.pantheon = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
|
@ -98,7 +105,7 @@ in
|
|||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
services.xserver.desktopManager.pantheon.sessionPath = utils.removePackagesByName [
|
||||
services.desktopManager.pantheon.sessionPath = utils.removePackagesByName [
|
||||
pkgs.pantheon.pantheon-agent-geoclue2
|
||||
] config.environment.pantheon.excludePackages;
|
||||
|
||||
|
|
@ -114,7 +121,14 @@ in
|
|||
|
||||
# Without this, elementary LightDM greeter will pre-select non-existent `default` session
|
||||
# https://github.com/elementary/greeter/issues/368
|
||||
services.displayManager.defaultSession = mkDefault "pantheon";
|
||||
services.displayManager.defaultSession = mkDefault "pantheon-wayland";
|
||||
programs.dconf.profiles.user.databases = [
|
||||
{
|
||||
settings."io/elementary/greeter" = {
|
||||
last-session-type = "pantheon-wayland";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
environment.extraInit = ''
|
||||
${concatMapStrings (p: ''
|
||||
|
|
@ -53,14 +53,14 @@ in
|
|||
let
|
||||
valueType =
|
||||
with lib.types;
|
||||
oneOf [
|
||||
(attrsOf (oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
path
|
||||
(listOf (attrsOf valueType))
|
||||
]
|
||||
(listOf valueType)
|
||||
]))
|
||||
// {
|
||||
description = "uMurmur config value";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ in
|
|||
./retroarch.nix
|
||||
./kodi.nix
|
||||
./mate.nix
|
||||
./pantheon.nix
|
||||
../../desktop-managers/pantheon.nix
|
||||
./surf-display.nix
|
||||
./cde.nix
|
||||
./cinnamon.nix
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ rec {
|
|||
{ ... }:
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.pantheon.enable = true;
|
||||
services.desktopManager.pantheon.enable = true;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1143,7 +1143,6 @@ in
|
|||
pam-zfs-key = runTest ./pam/zfs-key.nix;
|
||||
pantalaimon = runTest ./matrix/pantalaimon.nix;
|
||||
pantheon = runTest ./pantheon.nix;
|
||||
pantheon-wayland = runTest ./pantheon-wayland.nix;
|
||||
paperless = runTest ./paperless.nix;
|
||||
paretosecurity = runTest ./paretosecurity.nix;
|
||||
parsedmarc = handleTest ./parsedmarc { };
|
||||
|
|
|
|||
|
|
@ -1,104 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
name = "pantheon-wayland";
|
||||
|
||||
meta.maintainers = lib.teams.pantheon.members;
|
||||
|
||||
nodes.machine =
|
||||
{ nodes, ... }:
|
||||
|
||||
let
|
||||
videosAutostart = pkgs.writeTextFile {
|
||||
name = "autostart-elementary-videos";
|
||||
destination = "/etc/xdg/autostart/io.elementary.videos.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Videos
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=io.elementary.videos %U
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./common/user-account.nix ];
|
||||
|
||||
# Workaround ".gala-wrapped invoked oom-killer"
|
||||
virtualisation.memorySize = 2047;
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.pantheon.enable = true;
|
||||
services.displayManager = {
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = nodes.machine.users.users.alice.name;
|
||||
defaultSession = "pantheon-wayland";
|
||||
};
|
||||
|
||||
# We ship pantheon.appcenter by default when this is enabled.
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# For basic OCR tests.
|
||||
environment.systemPackages = [ videosAutostart ];
|
||||
|
||||
# We don't ship gnome-text-editor in Pantheon module, we add this line mainly
|
||||
# to catch eval issues related to this option.
|
||||
environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.users.users.alice;
|
||||
in
|
||||
''
|
||||
machine.wait_for_unit("display-manager.service")
|
||||
|
||||
with subtest("Wait for wayland server"):
|
||||
machine.wait_for_file("/run/user/${toString user.uid}/wayland-0")
|
||||
|
||||
with subtest("Check that logging in has given the user ownership of devices"):
|
||||
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
|
||||
|
||||
with subtest("Check if Pantheon components actually start"):
|
||||
# We specifically check gsd-xsettings here since it is manually pulled up by gala.
|
||||
# https://github.com/elementary/gala/pull/2140
|
||||
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]:
|
||||
machine.wait_until_succeeds(f"pgrep -f {i}")
|
||||
machine.wait_until_succeeds("pgrep -xf ${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal")
|
||||
|
||||
with subtest("Check if various environment variables are set"):
|
||||
cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ"
|
||||
machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'")
|
||||
machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'")
|
||||
# Hopefully from the sessionPath option.
|
||||
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
|
||||
# Hopefully from login shell.
|
||||
machine.succeed(f"{cmd} | grep '__NIXOS_SET_ENVIRONMENT_DONE' | grep '1'")
|
||||
# Hopefully from gcr-ssh-agent.
|
||||
machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'")
|
||||
|
||||
with subtest("Wait for elementary videos autostart"):
|
||||
machine.wait_until_succeeds("pgrep -f io.elementary.videos")
|
||||
machine.wait_for_text("No Videos Open")
|
||||
machine.screenshot("videos")
|
||||
|
||||
with subtest("Trigger multitasking view"):
|
||||
cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1"
|
||||
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus"
|
||||
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
|
||||
machine.sleep(5)
|
||||
machine.screenshot("multitasking")
|
||||
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
|
||||
|
||||
with subtest("Check if gala has ever coredumped"):
|
||||
machine.fail("coredumpctl --json=short | grep gala")
|
||||
# So we can see the dock.
|
||||
machine.execute("pkill -f -9 io.elementary.videos")
|
||||
machine.sleep(10)
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
}
|
||||
|
|
@ -8,6 +8,20 @@
|
|||
nodes.machine =
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
videosAutostart = pkgs.writeTextFile {
|
||||
name = "autostart-elementary-videos";
|
||||
destination = "/etc/xdg/autostart/io.elementary.videos.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Videos
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=io.elementary.videos %U
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./common/user-account.nix ];
|
||||
|
||||
|
|
@ -15,16 +29,19 @@
|
|||
virtualisation.memorySize = 2047;
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.pantheon.enable = true;
|
||||
services.desktopManager.pantheon.enable = true;
|
||||
|
||||
# We ship pantheon.appcenter by default when this is enabled.
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# For basic OCR tests.
|
||||
environment.systemPackages = [ videosAutostart ];
|
||||
|
||||
# We don't ship gnome-text-editor in Pantheon module, we add this line mainly
|
||||
# to catch eval issues related to this option.
|
||||
environment.pantheon.excludePackages = [ pkgs.gnome-text-editor ];
|
||||
|
||||
environment.systemPackages = [ pkgs.xdotool ];
|
||||
programs.ydotool.enable = true;
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
|
@ -33,7 +50,6 @@
|
|||
{ nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.users.users.alice;
|
||||
bob = nodes.machine.users.users.bob;
|
||||
in
|
||||
''
|
||||
machine.wait_for_unit("display-manager.service")
|
||||
|
|
@ -41,34 +57,34 @@
|
|||
with subtest("Test we can see usernames in elementary-greeter"):
|
||||
machine.wait_for_text("${user.description}")
|
||||
machine.wait_until_succeeds("pgrep -f io.elementary.greeter-compositor")
|
||||
# OCR was struggling with this one.
|
||||
# machine.wait_for_text("${bob.description}")
|
||||
# Ensure the password box is focused by clicking it.
|
||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/211366.
|
||||
machine.succeed("XAUTHORITY=/var/lib/lightdm/.Xauthority DISPLAY=:0 xdotool mousemove 512 505 click 1")
|
||||
machine.succeed("ydotool mousemove -a 220 275")
|
||||
machine.succeed("ydotool click 0xC0")
|
||||
machine.sleep(2)
|
||||
machine.screenshot("elementary_greeter_lightdm")
|
||||
|
||||
with subtest("Login with elementary-greeter"):
|
||||
machine.send_chars("${user.password}\n")
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_file("${user.home}/.Xauthority")
|
||||
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
||||
machine.wait_until_succeeds('journalctl -t gnome-session-binary --grep "Entering running state"')
|
||||
|
||||
with subtest("Wait for wayland server"):
|
||||
machine.wait_for_file("/run/user/${toString user.uid}/wayland-0")
|
||||
|
||||
with subtest("Check that logging in has given the user ownership of devices"):
|
||||
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
|
||||
|
||||
with subtest("Check if Pantheon components actually start"):
|
||||
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "io.elementary.desktop.agent-polkit"]:
|
||||
# We specifically check gsd-xsettings here since it is manually pulled up by gala.
|
||||
# https://github.com/elementary/gala/pull/2140
|
||||
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock", "gsd-media-keys", "gsd-xsettings", "io.elementary.desktop.agent-polkit"]:
|
||||
machine.wait_until_succeeds(f"pgrep -f {i}")
|
||||
for i in ["gala", "io.elementary.wingpanel", "io.elementary.dock"]:
|
||||
machine.wait_for_window(i)
|
||||
machine.wait_until_succeeds("pgrep -xf ${pkgs.pantheon.elementary-files}/libexec/io.elementary.files.xdg-desktop-portal")
|
||||
|
||||
with subtest("Check if various environment variables are set"):
|
||||
cmd = "xargs --null --max-args=1 echo < /proc/$(pgrep -xf ${pkgs.pantheon.gala}/bin/gala)/environ"
|
||||
machine.succeed(f"{cmd} | grep 'XDG_CURRENT_DESKTOP' | grep 'Pantheon'")
|
||||
machine.succeed(f"{cmd} | grep 'XDG_SESSION_TYPE' | grep 'wayland'")
|
||||
# Hopefully from the sessionPath option.
|
||||
machine.succeed(f"{cmd} | grep 'XDG_DATA_DIRS' | grep 'gsettings-schemas/pantheon-agent-geoclue2'")
|
||||
# Hopefully from login shell.
|
||||
|
|
@ -76,31 +92,14 @@
|
|||
# Hopefully from gcr-ssh-agent.
|
||||
machine.succeed(f"{cmd} | grep 'SSH_AUTH_SOCK' | grep 'gcr'")
|
||||
|
||||
with subtest("Open elementary videos"):
|
||||
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.videos >&2 &'")
|
||||
machine.sleep(2)
|
||||
machine.wait_for_window("io.elementary.videos")
|
||||
with subtest("Wait for elementary videos autostart"):
|
||||
machine.wait_until_succeeds("pgrep -f io.elementary.videos")
|
||||
machine.wait_for_text("No Videos Open")
|
||||
|
||||
with subtest("Open elementary calendar"):
|
||||
machine.wait_until_succeeds("pgrep -f evolution-calendar-factory")
|
||||
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.calendar >&2 &'")
|
||||
machine.sleep(2)
|
||||
machine.wait_for_window("io.elementary.calendar")
|
||||
|
||||
with subtest("Open system settings"):
|
||||
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.settings >&2 &'")
|
||||
# Wait for all plugins to be loaded before we check if the window is still there.
|
||||
machine.sleep(5)
|
||||
machine.wait_for_window("io.elementary.settings")
|
||||
|
||||
with subtest("Open elementary terminal"):
|
||||
machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'")
|
||||
machine.wait_for_window("io.elementary.terminal")
|
||||
machine.screenshot("videos")
|
||||
|
||||
with subtest("Trigger multitasking view"):
|
||||
cmd = "dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1"
|
||||
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus DISPLAY=:0"
|
||||
env = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus"
|
||||
machine.succeed(f"su - ${user.name} -c '{env} {cmd}'")
|
||||
machine.sleep(5)
|
||||
machine.screenshot("multitasking")
|
||||
|
|
@ -108,8 +107,8 @@
|
|||
|
||||
with subtest("Check if gala has ever coredumped"):
|
||||
machine.fail("coredumpctl --json=short | grep gala")
|
||||
# So you can see the dock in the below screenshot.
|
||||
machine.succeed("su - ${user.name} -c 'DISPLAY=:0 xdotool mousemove 450 1000 >&2 &'")
|
||||
# So we can see the dock.
|
||||
machine.execute("pkill -f -9 io.elementary.videos")
|
||||
machine.sleep(10)
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
llvmPackages_13,
|
||||
libxml2,
|
||||
ncurses,
|
||||
zlib,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "bfc";
|
||||
version = "1.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Wilfred";
|
||||
repo = "bfc";
|
||||
rev = version;
|
||||
hash = "sha256-5pcvwCtXWEexvV3TS62dZ6Opg8ANP2L8B0Z8u/OQENU=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-S8Fy0PRSUftljcX34Sj8MmlPW7Oob2yayPUA1RRxf8E=";
|
||||
|
||||
buildInputs = [
|
||||
libxml2
|
||||
ncurses
|
||||
zlib
|
||||
];
|
||||
|
||||
env.LLVM_SYS_130_PREFIX = llvmPackages_13.llvm.dev;
|
||||
|
||||
# process didn't exit successfully: <...> SIGSEGV
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Industrial-grade brainfuck compiler";
|
||||
mainProgram = "bfc";
|
||||
homepage = "https://bfc.wilfred.me.uk";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux;
|
||||
};
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ cfgpantheon = """ # Enable the X11 windowing system.
|
|||
|
||||
# Enable the Pantheon Desktop Environment.
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.desktopManager.pantheon.enable = true;
|
||||
services.desktopManager.pantheon.enable = true;
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
libffi,
|
||||
llvm_13,
|
||||
perl,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "dale";
|
||||
version = "20220411";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomhrr";
|
||||
repo = "dale";
|
||||
rev = "7386ef2d8912c60c6fb157a1e5cd772e15eaf658";
|
||||
sha256 = "sha256-LNWqrFuEjtL7zuPTBfe4qQWr8IrT/ldQWSeDTK3Wqmo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
llvm_13.dev
|
||||
];
|
||||
buildInputs = [
|
||||
libffi
|
||||
llvm_13
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ perl ];
|
||||
|
||||
checkTarget = "tests";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lisp-flavoured C";
|
||||
longDescription = ''
|
||||
Dale is a system (no GC) programming language that uses
|
||||
S-expressions for syntax and supports syntactic macros.
|
||||
'';
|
||||
homepage = "https://github.com/tomhrr/dale";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ amiloradovsky ];
|
||||
platforms = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
# failed on Darwin: linker couldn't find the FFI lib
|
||||
};
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
llvmPackages,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
llvm_12,
|
||||
ncurses,
|
||||
readline,
|
||||
zlib,
|
||||
libxml2,
|
||||
python3,
|
||||
}:
|
||||
llvmPackages.stdenv.mkDerivation {
|
||||
pname = "hobbes";
|
||||
version = "0-unstable-2025-04-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "morganstanley";
|
||||
repo = "hobbes";
|
||||
rev = "0829030be03d47f91075cbebd0c9565f44bf9911";
|
||||
hash = "sha256-GZ26XL4++2MWQED2tVWeJ8HFcFQUXnXZ3+JCgdlAXNo=";
|
||||
};
|
||||
|
||||
CXXFLAGS = [
|
||||
"-Wno-error=missing-template-arg-list-after-template-kw"
|
||||
"-Wno-error=deprecated-copy"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
llvm_12
|
||||
ncurses
|
||||
readline
|
||||
zlib
|
||||
libxml2
|
||||
python3
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
description = "Language and an embedded JIT compiler";
|
||||
longDescription = ''
|
||||
Hobbes is a a language, embedded compiler, and runtime for efficient
|
||||
dynamic expression evaluation, data storage and analysis.
|
||||
'';
|
||||
homepage = "https://github.com/morganstanley/hobbes";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [
|
||||
kthielen
|
||||
thmzlt
|
||||
];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "ledfx";
|
||||
version = "2.0.109";
|
||||
version = "2.0.110";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-fSb3NBl1bYCfwDkWI7/KeFIVcXTPDKBbLe0sQhneX6A=";
|
||||
hash = "sha256-utYpAIt9ThgV58h4p3d2q/pLfCU2zlXyCnTP2kqkDjg=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = true;
|
||||
|
|
@ -36,6 +36,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||
icmplib
|
||||
mss
|
||||
multidict
|
||||
netifaces2
|
||||
numpy
|
||||
openrgb-python
|
||||
paho-mqtt
|
||||
|
|
|
|||
40
pkgs/by-name/lr/lrcsnc/package.nix
Normal file
40
pkgs/by-name/lr/lrcsnc/package.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "lrcsnc";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Endg4meZer0";
|
||||
repo = "lrcsnc";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-gKb0cTpCPlyvJFthV1csn8HaVcUvXq+KC+nTT5sGhww=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-ww+SXy29woGlb120sj1oGb4MIQJzpBCKGpUKYsYxTMk=";
|
||||
|
||||
ldflags = [ "-X lrcsnc/internal/setup.version=${finalAttrs.version}" ];
|
||||
|
||||
# The tests require network access
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 LICENSE $out/share/licenses/lrcsnc/LICENSE
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Player-agnostic synced lyrics fetcher and displayer";
|
||||
homepage = "https://github.com/Endg4meZer0/lrcsnc";
|
||||
mainProgram = "lrcsnc";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ lonerOrz ];
|
||||
};
|
||||
})
|
||||
|
|
@ -13,7 +13,7 @@ let
|
|||
gemdir = ./.;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "maphosts";
|
||||
version = env.gems.maphosts.version;
|
||||
|
||||
|
|
@ -26,16 +26,16 @@ stdenv.mkDerivation {
|
|||
|
||||
passthru.updateScript = bundlerUpdateScript "maphosts";
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Small command line application for keeping your project hostnames in sync with /etc/hosts";
|
||||
homepage = "https://github.com/mpscholten/maphosts";
|
||||
changelog = "https://github.com/mpscholten/maphosts/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [
|
||||
changelog = "https://github.com/mpscholten/maphosts/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
mpscholten
|
||||
nicknovitski
|
||||
];
|
||||
platforms = platforms.all;
|
||||
platforms = lib.platforms.all;
|
||||
mainProgram = "maphosts";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -117,18 +117,18 @@ let
|
|||
mercurial-tests = makeTests { flags = "--with-hg=$MERCURIAL_BASE/bin/hg"; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Fast, lightweight SCM system for very large distributed projects";
|
||||
homepage = "https://www.mercurial-scm.org";
|
||||
downloadPage = "https://www.mercurial-scm.org/release/";
|
||||
changelog = "https://wiki.mercurial-scm.org/Release${versions.majorMinor version}";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [
|
||||
changelog = "https://wiki.mercurial-scm.org/Release${lib.versions.majorMinor version}";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
lukegb
|
||||
euxane
|
||||
techknowlogick
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "hg";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ assert blas.isILP64 == lapack.isILP64;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mopac";
|
||||
version = "23.1.2";
|
||||
version = "23.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openmopac";
|
||||
repo = "mopac";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-guMPXz7nQWxnmY4f+CGIAf3MBiV00GxSEdsZQ2fAjh4=";
|
||||
hash = "sha256-P2BEXzclHJHSoaIIgCKVC3j63Af+J6rO0acwjv9ybbA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
dbus,
|
||||
openssl,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "mpris-discord-rpc";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "patryk-ku";
|
||||
repo = "mpris-discord-rpc";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-tPIm07q5HWosqhA3zefyuwM+fIztNZe1sSpB/NmUIoE=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-3MJAvCc0ekUQ+eM5n8MdPNxXJWUgV76vi/Rq7GhhEPE=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
openssl
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir --parents $out/etc/systemd/user
|
||||
substitute $src/mpris-discord-rpc.service $out/etc/systemd/user/mpris-discord-rpc.service \
|
||||
--replace-fail /usr/bin/mpris-discord-rpc $out/bin/mpris-discord-rpc
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Linux Discord rich presence for music, using MPRIS with album cover and progress bar support";
|
||||
homepage = "https://github.com/patryk-ku/mpris-discord-rpc";
|
||||
changelog = "https://github.com/patryk-ku/mpris-discord-rpc/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.lukaswrz ];
|
||||
mainProgram = "mpris-discord-rpc";
|
||||
};
|
||||
})
|
||||
47
pkgs/by-name/mu/music-discord-rpc/package.nix
Normal file
47
pkgs/by-name/mu/music-discord-rpc/package.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
dbus,
|
||||
openssl,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "music-discord-rpc";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "patryk-ku";
|
||||
repo = "music-discord-rpc";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-+MSrGrnjkyLTCqQiSC2OIGAMgA2oLFqvUtud0kwTTGA=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Waw/7ErijLSq1RYtjlmtjP8vHYl3wXmRAXvGvH3wOZA=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
openssl
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir --parents $out/etc/systemd/user
|
||||
substitute music-discord-rpc.service $out/etc/systemd/user/music-discord-rpc.service \
|
||||
--replace-fail /usr/bin/music-discord-rpc $out/bin/music-discord-rpc
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Cross-platform Discord rich presence for music with album cover and progress bar support";
|
||||
homepage = "https://github.com/patryk-ku/music-discord-rpc";
|
||||
changelog = "https://github.com/patryk-ku/music-discord-rpc/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.lukaswrz ];
|
||||
mainProgram = "music-discord-rpc";
|
||||
};
|
||||
})
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
llvmPackages_13,
|
||||
readline,
|
||||
python3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "oclgrind";
|
||||
version = "21.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jrprice";
|
||||
repo = "oclgrind";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-DGCF7X2rPV1w9guxg2bMylRirXQgez24sG7Unlct3ow=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeCheckInputs = [ python3 ];
|
||||
buildInputs = [
|
||||
llvmPackages_13.llvm
|
||||
llvmPackages_13.clang-unwrapped
|
||||
readline
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCLANG_ROOT=${llvmPackages_13.clang-unwrapped}"
|
||||
(lib.cmakeBool "CMAKE_SKIP_RPATH" true)
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "OpenCL device simulator and debugger";
|
||||
homepage = "https://github.com/jrprice/oclgrind";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ athas ];
|
||||
};
|
||||
}
|
||||
|
|
@ -27,12 +27,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/pgf-tikz/pgf";
|
||||
description = "Portable Graphic Format for TeX";
|
||||
branch = lib.versions.major version;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.unix;
|
||||
branch = lib.versions.major finalAttrs.version;
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/pgf-tikz/pgf";
|
||||
description = "Portable Graphic Format for TeX - version ${finalAttrs.version}";
|
||||
branch = lib.versions.major version;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.unix;
|
||||
branch = lib.versions.major finalAttrs.version;
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
}:
|
||||
haskellPackages.mkDerivation rec {
|
||||
pname = "pshash";
|
||||
version = "0.1.15.1";
|
||||
version = "0.1.16.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "thornoar";
|
||||
repo = "pshash";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-TnMXT0sgUkHCbZ2YgDmSgOg8A2DKk/LyKK2XXwabrYc=";
|
||||
hash = "sha256-3Qe52Hto3Z96b5q9TLz7XB7BzMfdNBd4p8V6dknH6VM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
clang_15,
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "qrscan";
|
||||
version = "0.1.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sayanarijit";
|
||||
repo = "qrscan";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-nAUZUE7NppsCAV8UyR8+OkikT4nJtnamsSVeyNz21EQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
(rustPlatform.bindgenHook.overrideAttrs {
|
||||
libclang = clang_15.cc.lib;
|
||||
})
|
||||
];
|
||||
|
||||
cargoHash = "sha256-hBDB/Cp8JTk9hF3qDBCb7LicUZdpXHm2i2dsuw5geO4=";
|
||||
|
||||
checkFlags = [
|
||||
# requires filesystem write access
|
||||
"--skip=tests::test_export_files"
|
||||
"--skip=tests::test_scan_from_stdin"
|
||||
"--skip=tests::test_scan_jpeg_file"
|
||||
"--skip=tests::test_scan_no_content"
|
||||
"--skip=tests::test_scan_png_file"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Scan a QR code in the terminal using the system camera or a given image";
|
||||
mainProgram = "qrscan";
|
||||
homepage = "https://github.com/sayanarijit/qrscan";
|
||||
license = licenses.mit;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
maintainers = [ maintainers.sayanarijit ];
|
||||
};
|
||||
}
|
||||
68
pkgs/by-name/ra/radio-active/package.nix
Normal file
68
pkgs/by-name/ra/radio-active/package.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
ffmpeg,
|
||||
}:
|
||||
|
||||
let
|
||||
## https://github.com/deep5050/radio-active/blob/main/requirements.txt
|
||||
pyradios_1-0-2 = python3Packages.pyradios.overrideAttrs (
|
||||
finalAttrs: previousAttrs:
|
||||
let
|
||||
version = "1.0.2";
|
||||
in
|
||||
{
|
||||
inherit version;
|
||||
|
||||
src = previousAttrs.src.override {
|
||||
inherit version;
|
||||
hash = "sha256-O30ExmvWu4spwDytFVPWGjR8w3XSTaWd2Z0LGQibq9g=";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
pname = "radio-active";
|
||||
version = "2.9.1";
|
||||
in
|
||||
python3Packages.buildPythonApplication {
|
||||
inherit pname version;
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "S0AndS0";
|
||||
repo = "radio-active";
|
||||
rev = "2befa6a309d9c411ef1ea522e706ed3e098e5341";
|
||||
hash = "sha256-wqETmdqvxsKnjkjQADq59J83QkOhLA74SPtuWTpsvO0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace radioactive/recorder.py \
|
||||
--replace-fail '"ffmpeg",' '"${lib.getExe ffmpeg}",'
|
||||
|
||||
substituteInPlace radioactive/ffplay.py \
|
||||
--replace-fail 'self.exe_path = which(self.program_name)' \
|
||||
'self.exe_path = "${ffmpeg.outPath}/bin/ffplay"'
|
||||
'';
|
||||
|
||||
build-system = with python3Packages; [ setuptools ];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
requests
|
||||
urllib3
|
||||
psutil
|
||||
pyradios_1-0-2
|
||||
zenlog
|
||||
requests-cache
|
||||
rich
|
||||
pick
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Play any radios from around the globe right from the terminal";
|
||||
homepage = "https://www.radio-browser.info/";
|
||||
changelog = "https://github.com/deep5050/radio-active/releases/tag/v${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ S0AndS0 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
libX11,
|
||||
glslang,
|
||||
unordered_dense,
|
||||
llvmPackages_14,
|
||||
llvmPackages,
|
||||
versionCheckHook,
|
||||
gitUpdater,
|
||||
|
||||
|
|
@ -73,10 +73,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
libX11
|
||||
]
|
||||
++ lib.optionals withLLVM [
|
||||
# Slang only supports LLVM 14:
|
||||
# https://github.com/shader-slang/slang/blob/v2025.15/docs/building.md#llvm-support
|
||||
llvmPackages_14.llvm
|
||||
llvmPackages_14.libclang
|
||||
llvmPackages.llvm
|
||||
llvmPackages.libclang
|
||||
]
|
||||
++ lib.optionals withGlslang [
|
||||
# SPIRV-tools is included in glslang.
|
||||
|
|
@ -150,5 +148,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
maintainers = with lib.maintainers; [ niklaskorz ];
|
||||
mainProgram = "slangc";
|
||||
platforms = lib.platforms.all;
|
||||
# Slang only supports LLVM 14:
|
||||
# https://github.com/shader-slang/slang/blob/v2025.15/docs/building.md#llvm-support
|
||||
broken = withLLVM;
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,32 +1,41 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
|
||||
# nativeBuildInputs
|
||||
pkg-config,
|
||||
|
||||
# buildInputs
|
||||
libpcap,
|
||||
libxkbcommon,
|
||||
openssl,
|
||||
stdenv,
|
||||
alsa-lib,
|
||||
expat,
|
||||
fontconfig,
|
||||
vulkan-loader,
|
||||
wayland,
|
||||
xorg,
|
||||
|
||||
# wrapper
|
||||
libxkbcommon,
|
||||
wayland,
|
||||
|
||||
# tests
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "sniffnet";
|
||||
version = "1.3.2";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gyulyvgc";
|
||||
repo = "sniffnet";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-MWYCXLIv0euEHkfqZCxbfs1wFHkGIFk06wn7F8CIXx0=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-EgnFDF+K8qGjunWB20VA8bXLzNvyGzcIaim+smhW5fU=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-M7vIiGdH5+rdlqi603bfcXZavUAx2tU7+4sXb+QG+2g=";
|
||||
cargoHash = "sha256-22P1EeZ2FqwIHjr23oJCKvg3ggT1Me93goELwZ/B9S4=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
|
@ -51,6 +60,7 @@ rustPlatform.buildRustPackage rec {
|
|||
# requires internet access
|
||||
checkFlags = [
|
||||
"--skip=secondary_threads::check_updates::tests::fetch_latest_release_from_github"
|
||||
"--skip=utils::check_updates::tests::fetch_latest_release_from_github"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
|
|
@ -75,15 +85,22 @@ rustPlatform.buildRustPackage rec {
|
|||
}
|
||||
'';
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgramArg = "--version";
|
||||
doInstallCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Cross-platform application to monitor your network traffic with ease";
|
||||
homepage = "https://github.com/gyulyvgc/sniffnet";
|
||||
changelog = "https://github.com/gyulyvgc/sniffnet/blob/v${version}/CHANGELOG.md";
|
||||
changelog = "https://github.com/gyulyvgc/sniffnet/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
license = with lib.licenses; [
|
||||
mit # or
|
||||
asl20
|
||||
];
|
||||
maintainers = with lib.maintainers; [ figsoda ];
|
||||
teams = [ lib.teams.ngi ];
|
||||
mainProgram = "sniffnet";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -36,26 +36,6 @@ let
|
|||
rev = "v${version}";
|
||||
hash = "sha256-rt3RTZut41uDEh0YmpOzH3sOezeEVWtAIGMKCHLSJBw=";
|
||||
};
|
||||
"17" = rec {
|
||||
version = "17.0.15";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ETpTQYMMApECDfuRY87HrO/PUxZ13x9dBRJ3ychslUI=";
|
||||
};
|
||||
"16" = rec {
|
||||
version = "16.0.15";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-30i73tGl+1KlP92XA0uxdMTydd9EtaQ4SZ0W1kdm1fQ=";
|
||||
};
|
||||
"15" = rec {
|
||||
version = "15.0.15";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-kFVDS+qwoG1AXrZ8LytoiLVbZkTGR9sO+Wrq3VGgWNQ=";
|
||||
};
|
||||
"14" = rec {
|
||||
version = "14.0.14";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-PW+5w93omLYPZXjRtU4BNY2ztZ86pcjgUQZkrktMq+4=";
|
||||
};
|
||||
};
|
||||
|
||||
branch = versions."${llvmMajor}" or (throw "Incompatible LLVM version ${llvmMajor}");
|
||||
|
|
@ -70,14 +50,8 @@ stdenv.mkDerivation {
|
|||
inherit (branch) rev hash;
|
||||
};
|
||||
|
||||
patches = lib.optionals (llvmMajor == "14") [
|
||||
(fetchpatch {
|
||||
# tries to install llvm-spirv into llvm nix store path
|
||||
url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/cce9a2f130070d799000cac42fe24789d2b777ab.patch";
|
||||
revert = true;
|
||||
hash = "sha256-GbFacttZRDCgA0jkUoFA4/B3EDn3etweKvM09OwICJ8=";
|
||||
})
|
||||
];
|
||||
# TODO: Remove.
|
||||
patches = [ ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
llvmPackages_12,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
}:
|
||||
|
||||
llvmPackages_12.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "wavm";
|
||||
version = "2022-05-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "WAVM";
|
||||
repo = "WAVM";
|
||||
rev = "nightly/${finalAttrs.version}";
|
||||
hash = "sha256-SHz+oOOkwvVZucJYFSyZc3MnOAy1VatspmZmOAXYAWA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
llvmPackages_12.llvm
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "WebAssembly Virtual Machine";
|
||||
mainProgram = "wavm";
|
||||
homepage = "https://wavm.github.io";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ ereslibre ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
})
|
||||
|
|
@ -10,17 +10,17 @@
|
|||
}:
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "werf";
|
||||
version = "2.47.4";
|
||||
version = "2.47.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "werf";
|
||||
repo = "werf";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-V/RwHwPp1THlzFdMts5qt4Ueqcoxx932eMqgF6yiZpM=";
|
||||
hash = "sha256-rr0jHeAz8gcKj1rUzL8BoDFvuVrZF1+3I7ruKIvt8Rw=";
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-kFaXOvJBp/QU0N2Jwq450G48O2GYgC2Pc+2bGK9rJ9g=";
|
||||
vendorHash = "sha256-dULy4iLpp+wlvk8gdzLQTJ6reRI1YQ8//+EU7/U/Xkw=";
|
||||
|
||||
subPackages = [ "cmd/werf" ];
|
||||
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wezterm";
|
||||
version = "0-unstable-2025-07-30";
|
||||
version = "0-unstable-2025-08-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wez";
|
||||
owner = "wezterm";
|
||||
repo = "wezterm";
|
||||
rev = "6a493f88fab06a792308e0c704790390fd3c6232";
|
||||
rev = "bf9a2aeebacec19fd07b55234d626f006b22d369";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-ilDUBkXKo3N83ew3I+Ic48SBjraCs3OyjVXlTItX0mU=";
|
||||
hash = "sha256-cD0r+TchRc/A+G3HMu2PjjPm8m7Ue7GpH9F/PlfJcKE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
@ -156,7 +156,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
meta = with lib; {
|
||||
description = "GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust";
|
||||
homepage = "https://wezfurlong.org/wezterm";
|
||||
homepage = "https://wezterm.org";
|
||||
license = licenses.mit;
|
||||
mainProgram = "wezterm";
|
||||
maintainers = with maintainers; [
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
gnome-settings-daemon,
|
||||
mutter,
|
||||
elementary-icon-theme,
|
||||
elementary-settings-daemon,
|
||||
wingpanel-with-indicators,
|
||||
elementary-gtk-theme,
|
||||
nixos-artwork,
|
||||
|
|
@ -33,13 +34,15 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "elementary-greeter";
|
||||
version = "8.0.1";
|
||||
# To allow overriding last-session-type.
|
||||
# nixpkgs-update: no auto update
|
||||
version = "8.0.1-unstable-2025-09-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elementary";
|
||||
repo = "greeter";
|
||||
rev = version;
|
||||
sha256 = "sha256-T/tI8WRVbTLdolDYa98M2Vm26p0xhGiai74lXAlpQ8k=";
|
||||
rev = "2461ad1be4a4d0e541879abe869cf8911f505215";
|
||||
hash = "sha256-rDlaL2KCm0tz73cwHLgNAD7Ddbn1QFJVa+Syh5eTfWo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
@ -65,6 +68,7 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [
|
||||
accountsservice
|
||||
elementary-icon-theme
|
||||
elementary-settings-daemon
|
||||
gala # for io.elementary.desktop.background
|
||||
gnome-desktop
|
||||
gnome-settings-daemon
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "xfmpc-"; };
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "MPD client written in GTK";
|
||||
homepage = "https://docs.xfce.org/apps/xfmpc/start";
|
||||
changelog = "https://gitlab.xfce.org/apps/xfmpc/-/blob/xfmpc-${version}/NEWS";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
teams = [ teams.xfce ];
|
||||
changelog = "https://gitlab.xfce.org/apps/xfmpc/-/blob/xfmpc-${finalAttrs.version}/NEWS";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
teams = [ lib.teams.xfce ];
|
||||
mainProgram = "xfmpc";
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
llvmPackages,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
}:
|
||||
|
||||
llvmPackages.stdenv.mkDerivation rec {
|
||||
pname = "cone";
|
||||
version = "unstable-2022-12-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jondgoodwin";
|
||||
repo = pname;
|
||||
rev = "698bd6afc75777eabbc8ef576d64d683c6a1c5ab";
|
||||
sha256 = "0y2s9xgkci8n72v6gnc1i7shr2y3g2sa8fbr25gpxa9ipiq9khg7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [
|
||||
llvmPackages.llvm
|
||||
];
|
||||
|
||||
# M68k is an experimental target, so not enabled by default
|
||||
postPatch = ''
|
||||
sed -i CMakeLists.txt \
|
||||
-e '/M68k/d'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 conec $out/bin/conec
|
||||
install -Dm644 libconestd.a $out/lib/libconestd.a
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cone Programming Language";
|
||||
mainProgram = "conec";
|
||||
homepage = "https://cone.jondgoodwin.com";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -111,5 +111,9 @@ stdenv.mkDerivation rec {
|
|||
lgpl2
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
# See:
|
||||
# * <https://gitlab.com/freepascal.org/fpc/source/-/issues/41045>
|
||||
# * <https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/887>
|
||||
broken = stdenv.cc.isClang && stdenv.hostPlatform.isx86_64;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -892,6 +892,8 @@ stdenv.mkDerivation (
|
|||
timeout = 24 * 3600;
|
||||
platforms = lib.platforms.all;
|
||||
inherit (bootPkgs.ghc.meta) license;
|
||||
# To be fixed by <https://github.com/NixOS/nixpkgs/pull/440774>.
|
||||
broken = useLLVM;
|
||||
};
|
||||
|
||||
dontStrip = targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm;
|
||||
|
|
|
|||
|
|
@ -672,6 +672,8 @@ stdenv.mkDerivation (
|
|||
timeout = 24 * 3600;
|
||||
platforms = lib.platforms.all;
|
||||
inherit (bootPkgs.ghc.meta) license;
|
||||
# To be fixed by <https://github.com/NixOS/nixpkgs/pull/440774>.
|
||||
broken = useLLVM;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,235 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9e74014134a0..976e6a1757fd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4)
|
||||
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
|
||||
project(Clang)
|
||||
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS NO)
|
||||
@@ -416,7 +418,7 @@ include_directories(BEFORE
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/clang include/clang-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT clang-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
@@ -425,7 +427,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT clang-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
@@ -445,7 +447,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
|
||||
add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
|
||||
install(PROGRAMS utils/bash-autocomplete.sh
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT bash-autocomplete)
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-bash-autocomplete
|
||||
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
|
||||
index 704278a0e93b..d25c8d325c71 100644
|
||||
--- a/cmake/modules/AddClang.cmake
|
||||
+++ b/cmake/modules/AddClang.cmake
|
||||
@@ -123,9 +123,9 @@ macro(add_clang_library name)
|
||||
install(TARGETS ${lib}
|
||||
COMPONENT ${lib}
|
||||
${export_to_clangtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- RUNTIME DESTINATION bin)
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-${lib}
|
||||
@@ -170,7 +170,7 @@ macro(add_clang_tool name)
|
||||
|
||||
install(TARGETS ${name}
|
||||
${export_to_clangtargets}
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT ${name})
|
||||
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
@@ -185,7 +185,7 @@ endmacro()
|
||||
macro(add_clang_symlink name dest)
|
||||
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
# Always generate install targets
|
||||
- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
+ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
|
||||
endmacro()
|
||||
|
||||
function(clang_target_link_libraries target type)
|
||||
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
|
||||
index b2c0ce8dd4a0..19e5443d8c25 100644
|
||||
--- a/lib/Headers/CMakeLists.txt
|
||||
+++ b/lib/Headers/CMakeLists.txt
|
||||
@@ -215,7 +215,7 @@ set_target_properties(clang-resource-headers PROPERTIES
|
||||
FOLDER "Misc"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
|
||||
|
||||
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
||||
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
||||
|
||||
install(
|
||||
FILES ${files} ${generated_files}
|
||||
diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
|
||||
index ceef4b08637c..8efad5520ca4 100644
|
||||
--- a/tools/c-index-test/CMakeLists.txt
|
||||
+++ b/tools/c-index-test/CMakeLists.txt
|
||||
@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
|
||||
"@executable_path/../../lib")
|
||||
else()
|
||||
- set(INSTALL_DESTINATION bin)
|
||||
+ set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
install(TARGETS c-index-test
|
||||
diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt
|
||||
index 35ecdb11253c..d77d75de0094 100644
|
||||
--- a/tools/clang-format/CMakeLists.txt
|
||||
+++ b/tools/clang-format/CMakeLists.txt
|
||||
@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
|
||||
endif()
|
||||
|
||||
install(PROGRAMS clang-format-bbedit.applescript
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-format)
|
||||
install(PROGRAMS clang-format-diff.py
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-format)
|
||||
install(PROGRAMS clang-format-sublime.py
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-format)
|
||||
install(PROGRAMS clang-format.el
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-format)
|
||||
install(PROGRAMS clang-format.py
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-format)
|
||||
install(PROGRAMS git-clang-format
|
||||
- DESTINATION bin
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT clang-format)
|
||||
diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt
|
||||
index cda8e29ec5b1..0134d8ccd70b 100644
|
||||
--- a/tools/clang-rename/CMakeLists.txt
|
||||
+++ b/tools/clang-rename/CMakeLists.txt
|
||||
@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename
|
||||
)
|
||||
|
||||
install(PROGRAMS clang-rename.py
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-rename)
|
||||
install(PROGRAMS clang-rename.el
|
||||
- DESTINATION share/clang
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
|
||||
COMPONENT clang-rename)
|
||||
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
|
||||
index 51ff2e7e1565..1ed5f8a079a1 100644
|
||||
--- a/tools/libclang/CMakeLists.txt
|
||||
+++ b/tools/libclang/CMakeLists.txt
|
||||
@@ -166,7 +166,7 @@ endif()
|
||||
if(INTERNAL_INSTALL_PREFIX)
|
||||
set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
|
||||
else()
|
||||
- set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
|
||||
+ set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
endif()
|
||||
|
||||
install(DIRECTORY ../../include/clang-c
|
||||
@@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
|
||||
COMPONENT
|
||||
libclang-python-bindings
|
||||
DESTINATION
|
||||
- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
+ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
endforeach()
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
add_custom_target(libclang-python-bindings)
|
||||
diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
|
||||
index ec0702d76f18..d25d982f51da 100644
|
||||
--- a/tools/scan-build/CMakeLists.txt
|
||||
+++ b/tools/scan-build/CMakeLists.txt
|
||||
@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
|
||||
install(PROGRAMS bin/${BinFile}
|
||||
- DESTINATION bin
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT scan-build)
|
||||
endforeach()
|
||||
|
||||
@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD)
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
|
||||
install(PROGRAMS libexec/${LibexecFile}
|
||||
- DESTINATION libexec
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
|
||||
COMPONENT scan-build)
|
||||
endforeach()
|
||||
|
||||
@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD)
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
|
||||
install(FILES share/scan-build/${ShareFile}
|
||||
- DESTINATION share/scan-build
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build
|
||||
COMPONENT scan-build)
|
||||
endforeach()
|
||||
|
||||
diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
|
||||
index dd3d33439299..fea19c12ce70 100644
|
||||
--- a/tools/scan-view/CMakeLists.txt
|
||||
+++ b/tools/scan-view/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ if(CLANG_INSTALL_SCANVIEW)
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
|
||||
install(PROGRAMS bin/${BinFile}
|
||||
- DESTINATION bin
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT scan-view)
|
||||
endforeach()
|
||||
|
||||
@@ -33,7 +33,7 @@ if(CLANG_INSTALL_SCANVIEW)
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
|
||||
install(FILES share/${ShareFile}
|
||||
- DESTINATION share/scan-view
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view
|
||||
COMPONENT scan-view)
|
||||
endforeach()
|
||||
|
||||
diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt
|
||||
index 62f2de0cb15c..6aa66825b6ec 100644
|
||||
--- a/utils/hmaptool/CMakeLists.txt
|
||||
+++ b/utils/hmaptool/CMakeLists.txt
|
||||
@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
|
||||
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
|
||||
install(PROGRAMS ${CLANG_HMAPTOOL}
|
||||
- DESTINATION bin
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT hmaptool)
|
||||
|
||||
add_custom_target(hmaptool ALL DEPENDS ${Depends})
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Thu, 18 May 2017 11:56:12 -0500
|
||||
Subject: [PATCH] "purity" patch for 5.0
|
||||
|
||||
---
|
||||
lib/Driver/ToolChains/Gnu.cpp | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
|
||||
index fe3c0191bb..c6a482bece 100644
|
||||
--- a/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ b/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -487,12 +487,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
if (!IsStatic) {
|
||||
if (Args.hasArg(options::OPT_rdynamic))
|
||||
CmdArgs.push_back("-export-dynamic");
|
||||
-
|
||||
- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
|
||||
- CmdArgs.push_back("-dynamic-linker");
|
||||
- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
|
||||
- ToolChain.getDynamicLinker(Args)));
|
||||
- }
|
||||
}
|
||||
|
||||
CmdArgs.push_back("-o");
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
|
||||
index 3a66dd9c3fb..7efc85d9f9f 100644
|
||||
--- a/lib/builtins/CMakeLists.txt
|
||||
+++ b/lib/builtins/CMakeLists.txt
|
||||
@@ -345,4 +345,8 @@ if (NOT MSVC)
|
||||
|
||||
+ set(i486_SOURCES ${i386_SOURCES})
|
||||
+ set(i586_SOURCES ${i386_SOURCES})
|
||||
+ set(i686_SOURCES ${i386_SOURCES})
|
||||
+
|
||||
if (WIN32)
|
||||
set(i386_SOURCES
|
||||
${i386_SOURCES}
|
||||
@@ -608,6 +612,7 @@ else ()
|
||||
endif()
|
||||
|
||||
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
|
||||
+ message("arch: ${arch}")
|
||||
if (CAN_TARGET_${arch})
|
||||
# For ARM archs, exclude any VFP builtins if VFP is not supported
|
||||
if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
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
|
||||
--- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900
|
||||
+++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
set(ARM64 aarch64)
|
||||
-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
|
||||
+set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
|
||||
set(HEXAGON hexagon)
|
||||
set(X86 i386)
|
||||
set(X86_64 x86_64)
|
||||
diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt
|
||||
--- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900
|
||||
+++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900
|
||||
@@ -474,6 +474,7 @@
|
||||
set(armv7_SOURCES ${arm_SOURCES})
|
||||
set(armv7s_SOURCES ${arm_SOURCES})
|
||||
set(armv7k_SOURCES ${arm_SOURCES})
|
||||
+set(armv7l_SOURCES ${arm_SOURCES})
|
||||
set(arm64_SOURCES ${aarch64_SOURCES})
|
||||
|
||||
# macho_embedded archs
|
||||
@@ -595,7 +596,7 @@
|
||||
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
|
||||
if (CAN_TARGET_${arch})
|
||||
# For ARM archs, exclude any VFP builtins if VFP is not supported
|
||||
- if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
|
||||
+ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
|
||||
string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
|
||||
check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
|
||||
if(NOT COMPILER_RT_HAS_${arch}_VFP)
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Tue, 19 Sep 2017 13:13:06 -0500
|
||||
Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
|
||||
needs it
|
||||
|
||||
---
|
||||
cmake/Modules/AddCompilerRT.cmake | 8 ------
|
||||
test/asan/CMakeLists.txt | 52 ---------------------------------------
|
||||
test/tsan/CMakeLists.txt | 47 -----------------------------------
|
||||
3 files changed, 107 deletions(-)
|
||||
|
||||
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
|
||||
index bc5fb9ff7..b64eb4246 100644
|
||||
--- a/cmake/Modules/AddCompilerRT.cmake
|
||||
+++ b/cmake/Modules/AddCompilerRT.cmake
|
||||
@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
|
||||
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
|
||||
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
|
||||
endif()
|
||||
- if(APPLE)
|
||||
- # Ad-hoc sign the dylibs
|
||||
- add_custom_command(TARGET ${libname}
|
||||
- POST_BUILD
|
||||
- COMMAND codesign --sign - $<TARGET_FILE:${libname}>
|
||||
- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
|
||||
- )
|
||||
- endif()
|
||||
endif()
|
||||
install(TARGETS ${libname}
|
||||
ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
|
||||
2.14.1
|
||||
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b44ad2c2118e..d42f5664d448 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.13.4)
|
||||
# Check if compiler-rt is built as a standalone project.
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
|
||||
project(CompilerRT C CXX ASM)
|
||||
+ include(GNUInstallDirs)
|
||||
set(COMPILER_RT_STANDALONE_BUILD TRUE)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
endif()
|
||||
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
|
||||
index 361538a58e47..f0d8d9ab80f1 100644
|
||||
--- a/cmake/Modules/AddCompilerRT.cmake
|
||||
+++ b/cmake/Modules/AddCompilerRT.cmake
|
||||
@@ -495,7 +495,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
|
||||
add_custom_target(${target_name} DEPENDS ${dst_file})
|
||||
# Install in Clang resource directory.
|
||||
install(FILES ${file_name}
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
|
||||
COMPONENT ${component})
|
||||
add_dependencies(${component} ${target_name})
|
||||
|
||||
@@ -512,7 +512,7 @@ macro(add_compiler_rt_script name)
|
||||
add_custom_target(${name} DEPENDS ${dst})
|
||||
install(FILES ${dst}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin)
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR})
|
||||
endmacro(add_compiler_rt_script src name)
|
||||
|
||||
# Builds custom version of libc++ and installs it in <prefix>.
|
||||
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
|
||||
index 456a8dcda59f..7a09e74c7c79 100644
|
||||
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
|
||||
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
|
||||
@@ -508,7 +508,7 @@ macro(darwin_add_embedded_builtin_libraries)
|
||||
set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
|
||||
${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
|
||||
set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
|
||||
- ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
|
||||
+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded)
|
||||
|
||||
set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
|
||||
set(CFLAGS_i386 "-march=pentium")
|
||||
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
|
||||
index f61d487e93a0..f1f46fb9599c 100644
|
||||
--- a/cmake/Modules/CompilerRTUtils.cmake
|
||||
+++ b/cmake/Modules/CompilerRTUtils.cmake
|
||||
@@ -378,7 +378,7 @@ endfunction()
|
||||
function(get_compiler_rt_install_dir arch install_dir)
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
get_compiler_rt_target(${arch} target)
|
||||
- set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
|
||||
+ set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE)
|
||||
else()
|
||||
set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
|
||||
endif()
|
||||
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
|
||||
index 1edab43e7c0d..1aac6b73ff82 100644
|
||||
--- a/cmake/base-config-ix.cmake
|
||||
+++ b/cmake/base-config-ix.cmake
|
||||
@@ -65,11 +65,11 @@ if (LLVM_TREE_AVAILABLE)
|
||||
else()
|
||||
# Take output dir and install path from the user.
|
||||
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
|
||||
- "Path where built compiler-rt libraries should be stored.")
|
||||
+ "Path where built compiler-rt build artifacts should be stored.")
|
||||
set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
|
||||
"Path where built compiler-rt executables should be stored.")
|
||||
- set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH
|
||||
- "Path where built compiler-rt libraries should be installed.")
|
||||
+ set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
|
||||
+ "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.")
|
||||
option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
|
||||
option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF)
|
||||
# Use a host compiler to compile/link tests.
|
||||
@@ -97,7 +97,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
|
||||
set(COMPILER_RT_LIBRARY_OUTPUT_DIR
|
||||
${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
|
||||
set(COMPILER_RT_LIBRARY_INSTALL_DIR
|
||||
- ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
|
||||
+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
||||
index b00e8caa1ddd..0fe64e4862c9 100644
|
||||
--- a/include/CMakeLists.txt
|
||||
+++ b/include/CMakeLists.txt
|
||||
@@ -69,22 +69,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
|
||||
install(FILES ${SANITIZER_HEADERS}
|
||||
COMPONENT compiler-rt-headers
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer)
|
||||
# Install fuzzer headers.
|
||||
install(FILES ${FUZZER_HEADERS}
|
||||
COMPONENT compiler-rt-headers
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer)
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer)
|
||||
# Install xray headers.
|
||||
install(FILES ${XRAY_HEADERS}
|
||||
COMPONENT compiler-rt-headers
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray)
|
||||
# Install profile headers.
|
||||
install(FILES ${PROFILE_HEADERS}
|
||||
COMPONENT compiler-rt-headers
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile)
|
||||
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
|
||||
add_custom_target(install-compiler-rt-headers
|
||||
diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt
|
||||
index a29de8deff1b..d39ff01613d2 100644
|
||||
--- a/lib/dfsan/CMakeLists.txt
|
||||
+++ b/lib/dfsan/CMakeLists.txt
|
||||
@@ -57,4 +57,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
|
||||
DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
|
||||
add_dependencies(dfsan dfsan_abilist)
|
||||
install(FILES ${dfsan_abilist_filename}
|
||||
- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
|
||||
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
|
||||
index f1f46fb9599c..6f19e69507ba 100644
|
||||
--- a/cmake/Modules/CompilerRTUtils.cmake
|
||||
+++ b/cmake/Modules/CompilerRTUtils.cmake
|
||||
@@ -302,8 +302,9 @@ macro(load_llvm_config)
|
||||
# Get some LLVM variables from LLVMConfig.
|
||||
include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
|
||||
|
||||
- set(LLVM_LIBRARY_OUTPUT_INTDIR
|
||||
- ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
|
||||
+ ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ REALPATH)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 48cb8e004e08..fec8144fb95a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
|
||||
project(libunwind LANGUAGES C CXX ASM)
|
||||
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
set(PACKAGE_NAME libunwind)
|
||||
set(PACKAGE_VERSION 12.0.0)
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
@@ -115,17 +117,17 @@ set(CMAKE_MODULE_PATH
|
||||
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
if(LIBCXX_LIBDIR_SUBDIR)
|
||||
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
|
||||
string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
|
||||
endif()
|
||||
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
|
||||
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
else()
|
||||
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d4e561b50d8f..cfa5bdd79c2a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(LLD_BUILT_STANDALONE TRUE)
|
||||
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
|
||||
if(NOT LLVM_CONFIG_PATH)
|
||||
message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
|
||||
@@ -179,7 +181,7 @@ include_directories(BEFORE
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
)
|
||||
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
|
||||
index 23df41312403..d62372c88de7 100644
|
||||
--- a/cmake/modules/AddLLD.cmake
|
||||
+++ b/cmake/modules/AddLLD.cmake
|
||||
@@ -20,9 +20,9 @@ macro(add_lld_library name)
|
||||
install(TARGETS ${name}
|
||||
COMPONENT ${name}
|
||||
${export_to_lldtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- RUNTIME DESTINATION bin)
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
add_llvm_install_targets(install-${name}
|
||||
@@ -54,7 +54,7 @@ macro(add_lld_tool name)
|
||||
|
||||
install(TARGETS ${name}
|
||||
${export_to_lldtargets}
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT ${name})
|
||||
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
@@ -69,5 +69,5 @@ endmacro()
|
||||
macro(add_lld_symlink name dest)
|
||||
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
# Always generate install targets
|
||||
- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
+ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
|
||||
endmacro()
|
||||
diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt
|
||||
index 5cff736ff57f..64e775c771b9 100644
|
||||
--- a/tools/lld/CMakeLists.txt
|
||||
+++ b/tools/lld/CMakeLists.txt
|
||||
@@ -21,7 +21,7 @@ target_link_libraries(lld
|
||||
)
|
||||
|
||||
install(TARGETS lld
|
||||
- RUNTIME DESTINATION bin)
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
if(NOT LLD_SYMLINKS_TO_CREATE)
|
||||
set(LLD_SYMLINKS_TO_CREATE
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b5633e21c56a..f2f1035e9238 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH
|
||||
# If we are not building as part of LLVM, build LLDB as a standalone project,
|
||||
# using LLVM as an external library.
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
project(lldb)
|
||||
include(LLDBStandalone)
|
||||
|
||||
diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
|
||||
index 4ed5c647c5d2..89f96e710d55 100644
|
||||
--- a/cmake/modules/AddLLDB.cmake
|
||||
+++ b/cmake/modules/AddLLDB.cmake
|
||||
@@ -107,13 +107,13 @@ function(add_lldb_library name)
|
||||
endif()
|
||||
|
||||
if(PARAM_SHARED)
|
||||
- set(install_dest lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(PARAM_INSTALL_PREFIX)
|
||||
set(install_dest ${PARAM_INSTALL_PREFIX})
|
||||
endif()
|
||||
# RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
|
||||
install(TARGETS ${name} COMPONENT ${name}
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${install_dest}
|
||||
ARCHIVE DESTINATION ${install_dest}
|
||||
FRAMEWORK DESTINATION ${install_dest})
|
||||
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
|
||||
index 2fdf1502d055..37364341ff8b 100644
|
||||
--- a/cmake/modules/LLDBConfig.cmake
|
||||
+++ b/cmake/modules/LLDBConfig.cmake
|
||||
@@ -225,7 +225,7 @@ include_directories(BEFORE
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/
|
||||
COMPONENT lldb-headers
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN ".cmake" EXCLUDE
|
||||
@@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
|
||||
COMPONENT lldb-headers
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN ".cmake" EXCLUDE
|
||||
diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
|
||||
index 734167e51bc5..f95761b5df58 100644
|
||||
--- a/tools/intel-features/CMakeLists.txt
|
||||
+++ b/tools/intel-features/CMakeLists.txt
|
||||
@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
|
||||
endif()
|
||||
|
||||
install(TARGETS lldbIntelFeatures
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
|
||||
index 752113b..010f187 100644
|
||||
--- a/cmake/modules/LLDBStandalone.cmake
|
||||
+++ b/cmake/modules/LLDBStandalone.cmake
|
||||
@@ -62,7 +62,7 @@ endif()
|
||||
|
||||
# They are used as destination of target generators.
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
||||
-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||
+set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 OR CYGWIN)
|
||||
# DLL platform -- put DLLs into bin.
|
||||
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b5633e2..86e4738 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON)
|
||||
if(LLDB_BUILD_FRAMEWORK)
|
||||
set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
|
||||
else()
|
||||
- set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
|
||||
+ set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb")
|
||||
endif()
|
||||
get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
|
||||
finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")
|
||||
diff --git a/source/API/CMakeLists.txt b/source/API/CMakeLists.txt
|
||||
index b5633e2..86e4738 100644
|
||||
--- a/source/API/CMakeLists.txt 2024-05-30 19:08:14.241656491 -0700
|
||||
+++ b/source/API/CMakeLists.txt 2024-05-30 19:08:48.218219667 -0700
|
||||
@@ -113,14 +113,6 @@
|
||||
${option_install_prefix}
|
||||
)
|
||||
|
||||
-# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
|
||||
-# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so
|
||||
-# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so
|
||||
-# that _lldb.so can be loaded from Python.
|
||||
-if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE)
|
||||
- set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
-endif()
|
||||
-
|
||||
if(Python3_RPATH)
|
||||
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${Python3_RPATH}")
|
||||
set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
--- a/source/Plugins/Process/Linux/Procfs.h
|
||||
+++ b/source/Plugins/Process/Linux/Procfs.h
|
||||
@@ -11,21 +11,12 @@
|
||||
// sys/procfs.h on Android/Linux for all supported architectures.
|
||||
|
||||
#include <sys/ptrace.h>
|
||||
+#include <asm/ptrace.h>
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
-#if defined(__arm64__) || defined(__aarch64__)
|
||||
-typedef unsigned long elf_greg_t;
|
||||
-typedef elf_greg_t
|
||||
- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
|
||||
-typedef struct user_fpsimd_state elf_fpregset_t;
|
||||
-#ifndef NT_FPREGSET
|
||||
-#define NT_FPREGSET NT_PRFPREG
|
||||
-#endif // NT_FPREGSET
|
||||
-#elif defined(__mips__)
|
||||
-#ifndef NT_FPREGSET
|
||||
-#define NT_FPREGSET NT_PRFPREG
|
||||
-#endif // NT_FPREGSET
|
||||
-#endif
|
||||
-#else // __ANDROID__
|
||||
+#if !defined(__GLIBC__) && defined(__powerpc__)
|
||||
+#define pt_regs musl_pt_regs
|
||||
+#include <sys/procfs.h>
|
||||
+#undef pt_regs
|
||||
+#else
|
||||
#include <sys/procfs.h>
|
||||
-#endif // __ANDROID__
|
||||
+#endif
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
|
||||
index 37364341ff8b..7f74c1a3e257 100644
|
||||
--- a/cmake/modules/LLDBConfig.cmake
|
||||
+++ b/cmake/modules/LLDBConfig.cmake
|
||||
@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
|
||||
# Iterate over the possible places where the external resource directory
|
||||
# could be and pick the first that exists.
|
||||
foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
|
||||
- "${LLVM_BUILD_LIBRARY_DIR}"
|
||||
+ "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
|
||||
"${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
|
||||
# Build the resource directory path by appending 'clang/<version number>'.
|
||||
set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt b/lib/CodeGen/AsmPrinter/CMakeLists.txt
|
||||
index eb924282..c77c140b 100644
|
||||
--- a/lib/CodeGen/AsmPrinter/CMakeLists.txt
|
||||
+++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt
|
||||
@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter
|
||||
Support
|
||||
Target
|
||||
)
|
||||
+
|
||||
+if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
+ set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES
|
||||
+ COMPILE_FLAGS -fno-strict-aliasing)
|
||||
+endif()
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
|
||||
index ca7c04c565bb..6ed5db5dd4f8 100644
|
||||
--- a/tools/polly/CMakeLists.txt
|
||||
+++ b/tools/polly/CMakeLists.txt
|
||||
@@ -2,7 +2,11 @@
|
||||
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||
project(Polly)
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
+endif()
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
|
||||
+if (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||
# Where is LLVM installed?
|
||||
find_package(LLVM CONFIG REQUIRED)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
|
||||
@@ -122,13 +126,13 @@ include_directories(
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
)
|
||||
|
||||
install(DIRECTORY ${POLLY_BINARY_DIR}/include/
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
|
||||
index 7cc129ba2e90..137be25e4b80 100644
|
||||
--- a/tools/polly/cmake/CMakeLists.txt
|
||||
+++ b/tools/polly/cmake/CMakeLists.txt
|
||||
@@ -79,18 +79,18 @@ file(GENERATE
|
||||
|
||||
# Generate PollyConfig.cmake for the install tree.
|
||||
unset(POLLY_EXPORTS)
|
||||
-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
+set(POLLY_INSTALL_PREFIX "")
|
||||
set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
|
||||
-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
|
||||
+set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
if (POLLY_BUNDLED_ISL)
|
||||
set(POLLY_CONFIG_INCLUDE_DIRS
|
||||
- "${POLLY_INSTALL_PREFIX}/include"
|
||||
- "${POLLY_INSTALL_PREFIX}/include/polly"
|
||||
+ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
|
||||
+ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
|
||||
)
|
||||
else()
|
||||
set(POLLY_CONFIG_INCLUDE_DIRS
|
||||
- "${POLLY_INSTALL_PREFIX}/include"
|
||||
+ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
|
||||
${ISL_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
@@ -100,12 +100,12 @@ endif()
|
||||
foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
|
||||
get_target_property(tgt_type ${tgt} TYPE)
|
||||
if (tgt_type STREQUAL "EXECUTABLE")
|
||||
- set(tgt_prefix "bin/")
|
||||
+ set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
|
||||
else()
|
||||
- set(tgt_prefix "lib/")
|
||||
+ set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
|
||||
endif()
|
||||
|
||||
- set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
|
||||
+ set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
|
||||
file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
|
||||
|
||||
if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
|
||||
diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
|
||||
index 518a09b45a42..bd9d6f5542ad 100644
|
||||
--- a/tools/polly/cmake/polly_macros.cmake
|
||||
+++ b/tools/polly/cmake/polly_macros.cmake
|
||||
@@ -44,8 +44,8 @@ macro(add_polly_library name)
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
|
||||
install(TARGETS ${name}
|
||||
EXPORT LLVMExports
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
|
||||
endmacro(add_polly_library)
|
||||
diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
|
||||
index 8991094d92c7..178d8ad606bb 100644
|
||||
--- a/tools/polly/lib/External/CMakeLists.txt
|
||||
+++ b/tools/polly/lib/External/CMakeLists.txt
|
||||
@@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL)
|
||||
install(DIRECTORY
|
||||
${ISL_SOURCE_DIR}/include/
|
||||
${ISL_BINARY_DIR}/include/
|
||||
- DESTINATION include/polly
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "CMakeFiles" EXCLUDE
|
||||
|
|
@ -1,417 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 277d0fe54d7b..af69c8be8745 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -256,15 +256,21 @@ if (CMAKE_BUILD_TYPE AND
|
||||
message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
|
||||
|
||||
-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
|
||||
+set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
|
||||
+ "Path for binary subdirectory (defaults to 'bin')")
|
||||
mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
|
||||
|
||||
set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
|
||||
"Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
|
||||
mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
|
||||
|
||||
+set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
|
||||
+ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
|
||||
+
|
||||
# They are used as destination of target generators.
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
||||
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||
@@ -567,9 +573,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
|
||||
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
|
||||
option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
|
||||
|
||||
-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
|
||||
+set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
|
||||
CACHE STRING "Doxygen-generated HTML documentation install directory")
|
||||
-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
|
||||
+set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
|
||||
CACHE STRING "OCamldoc-generated HTML documentation install directory")
|
||||
|
||||
option (LLVM_BUILD_EXTERNAL_COMPILER_RT
|
||||
@@ -1027,7 +1033,7 @@ endif()
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/llvm include/llvm-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT llvm-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
@@ -1038,7 +1044,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
)
|
||||
|
||||
install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT llvm-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
@@ -1052,13 +1058,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
|
||||
if (LLVM_INSTALL_MODULEMAPS)
|
||||
install(DIRECTORY include/llvm include/llvm-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT llvm-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "module.modulemap"
|
||||
)
|
||||
install(FILES include/llvm/module.install.modulemap
|
||||
- DESTINATION include/llvm
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
|
||||
COMPONENT llvm-headers
|
||||
RENAME "module.extern.modulemap"
|
||||
)
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index 97c9980c7de3..409e8b615f75 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -804,9 +804,9 @@ macro(add_llvm_library name)
|
||||
|
||||
install(TARGETS ${name}
|
||||
${export_to_llvmexports}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- RUNTIME DESTINATION bin COMPONENT ${name})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-${name}
|
||||
@@ -1022,7 +1022,7 @@ function(process_llvm_pass_plugins)
|
||||
"set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
|
||||
install(FILES
|
||||
${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
|
||||
- DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
+ DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
|
||||
COMPONENT cmake-exports)
|
||||
|
||||
set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
|
||||
@@ -1242,7 +1242,7 @@ macro(add_llvm_example name)
|
||||
endif()
|
||||
add_llvm_executable(${name} ${ARGN})
|
||||
if( LLVM_BUILD_EXAMPLES )
|
||||
- install(TARGETS ${name} RUNTIME DESTINATION examples)
|
||||
+ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
|
||||
endif()
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Examples")
|
||||
endmacro(add_llvm_example name)
|
||||
@@ -1854,7 +1854,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
|
||||
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 AND "${type}" STREQUAL "SHARED")
|
||||
set(output_dir bin)
|
||||
endif()
|
||||
@@ -1871,7 +1871,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
-function(llvm_install_symlink name dest)
|
||||
+function(llvm_install_symlink name dest output_dir)
|
||||
cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
|
||||
foreach(path ${CMAKE_MODULE_PATH})
|
||||
if(EXISTS ${path}/LLVMInstallSymlink.cmake)
|
||||
@@ -1894,7 +1894,7 @@ function(llvm_install_symlink name dest)
|
||||
set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
install(SCRIPT ${INSTALL_SYMLINK}
|
||||
- CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
|
||||
+ CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
|
||||
COMPONENT ${component})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
|
||||
@@ -1977,7 +1977,8 @@ function(add_llvm_tool_symlink link_name target)
|
||||
endif()
|
||||
|
||||
if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
|
||||
- llvm_install_symlink(${link_name} ${target})
|
||||
+ GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
|
||||
+ llvm_install_symlink(${link_name} ${target} ${output_dir})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -2100,9 +2101,9 @@ function(llvm_setup_rpath name)
|
||||
|
||||
if (APPLE)
|
||||
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
|
||||
- set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(UNIX)
|
||||
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
|
||||
set_property(TARGET ${name} APPEND_STRING PROPERTY
|
||||
LINK_FLAGS " -Wl,-z,origin ")
|
||||
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
|
||||
index 554046b20edf..4d1ad980641e 100644
|
||||
--- a/cmake/modules/AddOCaml.cmake
|
||||
+++ b/cmake/modules/AddOCaml.cmake
|
||||
@@ -144,9 +144,9 @@ function(add_ocaml_library name)
|
||||
endforeach()
|
||||
|
||||
if( APPLE )
|
||||
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
|
||||
index e80c3b5c1cac..482f6d715ef5 100644
|
||||
--- a/cmake/modules/AddSphinxTarget.cmake
|
||||
+++ b/cmake/modules/AddSphinxTarget.cmake
|
||||
@@ -90,7 +90,7 @@ function (add_sphinx_target builder project)
|
||||
endif()
|
||||
elseif (builder STREQUAL html)
|
||||
string(TOUPPER "${project}" project_upper)
|
||||
- set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
|
||||
+ set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
|
||||
CACHE STRING "HTML documentation install directory for ${project}")
|
||||
|
||||
# '/.' indicates: copy the contents of the directory directly into
|
||||
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
|
||||
index 505dc9a29d70..36e6c63af3f4 100644
|
||||
--- a/cmake/modules/CMakeLists.txt
|
||||
+++ b/cmake/modules/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
|
||||
+set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
|
||||
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
|
||||
# First for users who use an installed LLVM, create the LLVMExports.cmake file.
|
||||
@@ -107,13 +107,13 @@ foreach(p ${_count})
|
||||
set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
|
||||
get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
|
||||
endforeach(p)
|
||||
-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
|
||||
+set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
|
||||
set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
|
||||
-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
|
||||
+set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
|
||||
set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
|
||||
-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
|
||||
+set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
# Generate a default location for lit
|
||||
if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
|
||||
diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
index 09fed8085c23..aa79f192abf0 100644
|
||||
--- a/cmake/modules/LLVMInstallSymlink.cmake
|
||||
+++ b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
@@ -10,7 +10,7 @@ function(install_symlink name target outdir)
|
||||
set(LINK_OR_COPY copy)
|
||||
endif()
|
||||
|
||||
- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
|
||||
+ set(bindir "${DESTDIR}${outdir}/")
|
||||
|
||||
message(STATUS "Creating ${name}")
|
||||
|
||||
diff --git a/docs/CMake.rst b/docs/CMake.rst
|
||||
index bb821b417ad9..6a528f7c2ad3 100644
|
||||
--- a/docs/CMake.rst
|
||||
+++ b/docs/CMake.rst
|
||||
@@ -196,7 +196,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
|
||||
**LLVM_LIBDIR_SUFFIX**:STRING
|
||||
Extra suffix to append to the directory where libraries are to be
|
||||
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
|
||||
- to install libraries to ``/usr/lib64``.
|
||||
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
|
||||
|
||||
**CMAKE_C_FLAGS**:STRING
|
||||
Extra flags to use when compiling C source files.
|
||||
@@ -550,8 +550,8 @@ LLVM-specific variables
|
||||
|
||||
**LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
|
||||
The path to install Doxygen-generated HTML documentation to. This path can
|
||||
- either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
|
||||
- `share/doc/llvm/doxygen-html`.
|
||||
+ either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
|
||||
+ `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
|
||||
|
||||
**LLVM_ENABLE_SPHINX**:BOOL
|
||||
If specified, CMake will search for the ``sphinx-build`` executable and will make
|
||||
@@ -582,13 +582,33 @@ LLVM-specific variables
|
||||
|
||||
**LLVM_INSTALL_SPHINX_HTML_DIR**:STRING
|
||||
The path to install Sphinx-generated HTML documentation to. This path can
|
||||
- either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
|
||||
- `share/doc/llvm/html`.
|
||||
+ either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
|
||||
+ `${CMAKE_INSTALL_DOCDIR}/${project}/html`.
|
||||
|
||||
**LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING
|
||||
The path to install OCamldoc-generated HTML documentation to. This path can
|
||||
- either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
|
||||
- `share/doc/llvm/ocaml-html`.
|
||||
+ either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
|
||||
+ `${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html`.
|
||||
+
|
||||
+**CMAKE_INSTALL_BINDIR**:STRING
|
||||
+ The path to install binary tools, relative to the ``CMAKE_INSTALL_PREFIX``.
|
||||
+ Defaults to `bin`.
|
||||
+
|
||||
+**CMAKE_INSTALL_LIBDIR**:STRING
|
||||
+ The path to install libraries, relative to the ``CMAKE_INSTALL_PREFIX``.
|
||||
+ Defaults to `lib`.
|
||||
+
|
||||
+**CMAKE_INSTALL_INCLUDEDIR**:STRING
|
||||
+ The path to install header files, relative to the ``CMAKE_INSTALL_PREFIX``.
|
||||
+ Defaults to `include`.
|
||||
+
|
||||
+**CMAKE_INSTALL_DOCDIR**:STRING
|
||||
+ The path to install documentation, relative to the ``CMAKE_INSTALL_PREFIX``.
|
||||
+ Defaults to `share/doc`.
|
||||
+
|
||||
+**CMAKE_INSTALL_MANDIR**:STRING
|
||||
+ The path to install manpage files, relative to the ``CMAKE_INSTALL_PREFIX``.
|
||||
+ Defaults to `share/man`.
|
||||
|
||||
**LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL
|
||||
macOS Only: If enabled CMake will generate a target named
|
||||
@@ -786,9 +806,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
|
||||
|
||||
This file is available in two different locations.
|
||||
|
||||
-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
|
||||
- ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
|
||||
- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
|
||||
+* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
|
||||
+ ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
|
||||
+ installed as part of an installed version of LLVM. This is typically
|
||||
+ ``cmake/llvm/`` within the lib directory. On Linux, this is typically
|
||||
+ ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
|
||||
|
||||
* ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
|
||||
``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
|
||||
diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt
|
||||
index bb96edb4b4bf..678c22fb43c8 100644
|
||||
--- a/examples/Bye/CMakeLists.txt
|
||||
+++ b/examples/Bye/CMakeLists.txt
|
||||
@@ -14,6 +14,6 @@ if (NOT WIN32)
|
||||
BUILDTREE_ONLY
|
||||
)
|
||||
|
||||
- install(TARGETS ${name} RUNTIME DESTINATION examples)
|
||||
+ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Examples")
|
||||
endif()
|
||||
diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
|
||||
index b46319f24fc8..2feabd1954e4 100644
|
||||
--- a/include/llvm/CMakeLists.txt
|
||||
+++ b/include/llvm/CMakeLists.txt
|
||||
@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
|
||||
# If we're doing an out-of-tree build, copy a module map for generated
|
||||
# header files into the build area.
|
||||
if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
- configure_file(module.modulemap.build module.modulemap COPYONLY)
|
||||
+ configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
|
||||
endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
|
||||
index ebe5b73a5c65..70c497be12f5 100644
|
||||
--- a/tools/llvm-config/BuildVariables.inc.in
|
||||
+++ b/tools/llvm-config/BuildVariables.inc.in
|
||||
@@ -23,6 +23,10 @@
|
||||
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
|
||||
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
|
||||
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
|
||||
+#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
|
||||
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
|
||||
+#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
+#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
|
||||
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
|
||||
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
|
||||
#define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
|
||||
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
||||
index 1a2f04552d13..44fa7d3eec6b 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -357,12 +357,26 @@ int main(int argc, char **argv) {
|
||||
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
|
||||
} else {
|
||||
ActivePrefix = CurrentExecPrefix;
|
||||
- ActiveIncludeDir = ActivePrefix + "/include";
|
||||
- SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
|
||||
- sys::fs::make_absolute(ActivePrefix, path);
|
||||
- ActiveBinDir = std::string(path.str());
|
||||
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
|
||||
- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveIncludeDir = std::string(path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveBinDir = std::string(path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveLibDir = std::string(path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveCMakeDir = std::string(path.str());
|
||||
+ }
|
||||
ActiveIncludeOption = "-I" + ActiveIncludeDir;
|
||||
}
|
||||
|
||||
diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
|
||||
index 2963f97cad88..69d66c9c9ca1 100644
|
||||
--- a/tools/lto/CMakeLists.txt
|
||||
+++ b/tools/lto/CMakeLists.txt
|
||||
@@ -25,7 +25,7 @@ add_llvm_library(LTO SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS
|
||||
intrinsics_gen)
|
||||
|
||||
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
|
||||
- DESTINATION include/llvm-c
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
|
||||
COMPONENT LTO)
|
||||
|
||||
if (APPLE)
|
||||
diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
|
||||
index ead73ec13a8f..250362021f17 100644
|
||||
--- a/tools/opt-viewer/CMakeLists.txt
|
||||
+++ b/tools/opt-viewer/CMakeLists.txt
|
||||
@@ -8,7 +8,7 @@ set (files
|
||||
|
||||
foreach (file ${files})
|
||||
install(PROGRAMS ${file}
|
||||
- DESTINATION share/opt-viewer
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
|
||||
COMPONENT opt-viewer)
|
||||
endforeach (file)
|
||||
|
||||
diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
|
||||
index 865436247270..ce1daa62f6ab 100644
|
||||
--- a/tools/remarks-shlib/CMakeLists.txt
|
||||
+++ b/tools/remarks-shlib/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC)
|
||||
endif()
|
||||
|
||||
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
|
||||
- DESTINATION include/llvm-c
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
|
||||
COMPONENT Remarks)
|
||||
|
||||
if (APPLE)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
diff --git a/test/Bindings/Go/lit.local.cfg b/test/Bindings/Go/lit.local.cfg
|
||||
index 91a0ad89..4da83a1a 100644
|
||||
--- a/test/Bindings/Go/lit.local.cfg
|
||||
+++ b/test/Bindings/Go/lit.local.cfg
|
||||
@@ -1,5 +1,4 @@
|
||||
import os
|
||||
-import pipes
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
@@ -56,7 +55,7 @@ def fixup_compiler_path(compiler):
|
||||
except (AttributeError, OSError):
|
||||
pass
|
||||
|
||||
- return ' '.join([pipes.quote(arg) for arg in args])
|
||||
+ return ' '.join([shlex.quote(arg) for arg in args])
|
||||
|
||||
config.environment['CC'] = fixup_compiler_path(config.host_cc)
|
||||
config.environment['CXX'] = fixup_compiler_path(config.host_cxx)
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
--- b/include/clang/Basic/TargetInfo.h
|
||||
+++ a/include/clang/Basic/TargetInfo.h
|
||||
@@ -612,8 +612,8 @@
|
||||
}
|
||||
|
||||
/// Return the largest alignment for which a suitably-sized allocation with
|
||||
+ /// '::operator new(size_t)' is guaranteed to produce a correctly-aligned
|
||||
+ /// pointer.
|
||||
- /// '::operator new(size_t)' or 'malloc' is guaranteed to produce a
|
||||
- /// correctly-aligned pointer.
|
||||
unsigned getNewAlign() const {
|
||||
return NewAlign ? NewAlign : std::max(LongDoubleAlign, LongLongAlign);
|
||||
}
|
||||
--- b/lib/CodeGen/CGCall.cpp
|
||||
+++ a/lib/CodeGen/CGCall.cpp
|
||||
@@ -2048,24 +2048,6 @@
|
||||
// allows it to work on indirect virtual function calls.
|
||||
if (AttrOnCallSite && TargetDecl->hasAttr<NoMergeAttr>())
|
||||
FuncAttrs.addAttribute(llvm::Attribute::NoMerge);
|
||||
-
|
||||
- // Add known guaranteed alignment for allocation functions.
|
||||
- if (unsigned BuiltinID = Fn->getBuiltinID()) {
|
||||
- switch (BuiltinID) {
|
||||
- case Builtin::BIaligned_alloc:
|
||||
- case Builtin::BIcalloc:
|
||||
- case Builtin::BImalloc:
|
||||
- case Builtin::BImemalign:
|
||||
- case Builtin::BIrealloc:
|
||||
- case Builtin::BIstrdup:
|
||||
- case Builtin::BIstrndup:
|
||||
- RetAttrs.addAlignmentAttr(Context.getTargetInfo().getNewAlign() /
|
||||
- Context.getTargetInfo().getCharWidth());
|
||||
- break;
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
// 'const', 'pure' and 'noalias' attributed functions are also nounwind.
|
||||
--- b/test/CodeGen/alloc-fns-alignment.c
|
||||
+++ /dev/null
|
||||
@@ -1,35 +0,0 @@
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
|
||||
-// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
|
||||
-// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN16
|
||||
-// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -emit-llvm < %s | FileCheck %s --check-prefix=ALIGN8
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-malloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-MALLOC
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-calloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-CALLOC
|
||||
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-builtin-realloc -emit-llvm < %s | FileCheck %s --check-prefix=NOBUILTIN-REALLOC
|
||||
-
|
||||
-typedef __SIZE_TYPE__ size_t;
|
||||
-
|
||||
-void *malloc(size_t);
|
||||
-void *calloc(size_t, size_t);
|
||||
-void *realloc(void *, size_t);
|
||||
-
|
||||
-void *malloc_test(size_t n) {
|
||||
- return malloc(n);
|
||||
-}
|
||||
-
|
||||
-void *calloc_test(size_t n) {
|
||||
- return calloc(1, n);
|
||||
-}
|
||||
-
|
||||
-void *raalloc_test(void *p, size_t n) {
|
||||
- return realloc(p, n);
|
||||
-}
|
||||
-
|
||||
-// ALIGN16: align 16 i8* @malloc
|
||||
-// ALIGN16: align 16 i8* @calloc
|
||||
-// ALIGN16: align 16 i8* @realloc
|
||||
-// ALIGN8: align 8 i8* @malloc
|
||||
-// ALIGN8: align 8 i8* @calloc
|
||||
-// ALIGN8: align 8 i8* @realloc
|
||||
-// NOBUILTIN-MALLOC: declare i8* @malloc
|
||||
-// NOBUILTIN-CALLOC: declare i8* @calloc
|
||||
-// NOBUILTIN-REALLOC: declare i8* @realloc
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
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
|
||||
--- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900
|
||||
+++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900
|
||||
@@ -37,6 +37,6 @@
|
||||
|
||||
set(ARM64 aarch64)
|
||||
-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv8m.main armv8.1m.main)
|
||||
+set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l armv8m.main armv8.1m.main)
|
||||
set(HEXAGON hexagon)
|
||||
set(X86 i386)
|
||||
set(X86_64 x86_64)
|
||||
diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt
|
||||
--- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900
|
||||
+++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900
|
||||
@@ -555,6 +555,7 @@
|
||||
set(armv7_SOURCES ${arm_SOURCES})
|
||||
set(armv7s_SOURCES ${arm_SOURCES})
|
||||
set(armv7k_SOURCES ${arm_SOURCES})
|
||||
+set(armv7l_SOURCES ${arm_SOURCES})
|
||||
set(arm64_SOURCES ${aarch64_SOURCES})
|
||||
|
||||
# macho_embedded archs
|
||||
@@ -705,7 +705,7 @@
|
||||
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
|
||||
if (CAN_TARGET_${arch})
|
||||
# For ARM archs, exclude any VFP builtins if VFP is not supported
|
||||
- if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
|
||||
+ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
|
||||
string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
|
||||
check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
|
||||
if(NOT COMPILER_RT_HAS_${arch}_VFP)
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Tue, 19 Sep 2017 13:13:06 -0500
|
||||
Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
|
||||
needs it
|
||||
|
||||
---
|
||||
cmake/Modules/AddCompilerRT.cmake | 8 ------
|
||||
test/asan/CMakeLists.txt | 52 ---------------------------------------
|
||||
test/tsan/CMakeLists.txt | 47 -----------------------------------
|
||||
3 files changed, 107 deletions(-)
|
||||
|
||||
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
|
||||
index bc69ec95c419..9f100fdcec2f 100644
|
||||
--- a/cmake/Modules/AddCompilerRT.cmake
|
||||
+++ b/cmake/Modules/AddCompilerRT.cmake
|
||||
@@ -366,14 +366,6 @@ function(add_compiler_rt_runtime name type)
|
||||
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
|
||||
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
|
||||
endif()
|
||||
- if(APPLE)
|
||||
- # Ad-hoc sign the dylibs
|
||||
- add_custom_command(TARGET ${libname}
|
||||
- POST_BUILD
|
||||
- COMMAND codesign --sign - $<TARGET_FILE:${libname}>
|
||||
- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR}
|
||||
- )
|
||||
- endif()
|
||||
endif()
|
||||
|
||||
set(parent_target_arg)
|
||||
2.14.1
|
||||
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
diff --git a/lib/sanitizer_common/sanitizer_mac.cpp b/lib/sanitizer_common/sanitizer_mac.cpp
|
||||
--- a/lib/sanitizer_common/sanitizer_mac.cpp
|
||||
+++ b/lib/sanitizer_common/sanitizer_mac.cpp
|
||||
@@ -613,9 +613,15 @@ HandleSignalMode GetHandleSignalMode(int signum) {
|
||||
// Offset example:
|
||||
// XNU 17 -- macOS 10.13 -- iOS 11 -- tvOS 11 -- watchOS 4
|
||||
constexpr u16 GetOSMajorKernelOffset() {
|
||||
- if (TARGET_OS_OSX) return 4;
|
||||
- if (TARGET_OS_IOS || TARGET_OS_TV) return 6;
|
||||
- if (TARGET_OS_WATCH) return 13;
|
||||
+#if TARGET_OS_OSX
|
||||
+ return 4;
|
||||
+#endif
|
||||
+#if TARGET_OS_IOS || TARGET_OS_TV
|
||||
+ return 6;
|
||||
+#endif
|
||||
+#if TARGET_OS_WATCH
|
||||
+ return 13;
|
||||
+#endif
|
||||
}
|
||||
|
||||
using VersStr = char[64];
|
||||
@@ -627,13 +633,13 @@ static uptr ApproximateOSVersionViaKernelVersion(VersStr vers) {
|
||||
u16 os_major = kernel_major - offset;
|
||||
|
||||
const char *format = "%d.0";
|
||||
- if (TARGET_OS_OSX) {
|
||||
- if (os_major >= 16) { // macOS 11+
|
||||
- os_major -= 5;
|
||||
- } else { // macOS 10.15 and below
|
||||
- format = "10.%d";
|
||||
- }
|
||||
+#if TARGET_OS_OSX
|
||||
+ if (os_major >= 16) { // macOS 11+
|
||||
+ os_major -= 5;
|
||||
+ } else { // macOS 10.15 and below
|
||||
+ format = "10.%d";
|
||||
}
|
||||
+#endif
|
||||
return internal_snprintf(vers, sizeof(VersStr), format, os_major);
|
||||
}
|
||||
|
||||
@@ -681,15 +687,14 @@ void ParseVersion(const char *vers, u16 *major, u16 *minor) {
|
||||
// Aligned versions example:
|
||||
// macOS 10.15 -- iOS 13 -- tvOS 13 -- watchOS 6
|
||||
static void MapToMacos(u16 *major, u16 *minor) {
|
||||
- if (TARGET_OS_OSX)
|
||||
- return;
|
||||
-
|
||||
- if (TARGET_OS_IOS || TARGET_OS_TV)
|
||||
+#if !TARGET_OS_OSX
|
||||
+#if TARGET_OS_IOS || TARGET_OS_TV
|
||||
*major += 2;
|
||||
- else if (TARGET_OS_WATCH)
|
||||
+#elif TARGET_OS_WATCH
|
||||
*major += 9;
|
||||
- else
|
||||
+#else
|
||||
UNREACHABLE("unsupported platform");
|
||||
+#endif
|
||||
|
||||
if (*major >= 16) { // macOS 11+
|
||||
*major -= 5;
|
||||
@@ -697,6 +702,7 @@ static void MapToMacos(u16 *major, u16 *minor) {
|
||||
*minor = *major;
|
||||
*major = 10;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
static MacosVersion GetMacosAlignedVersionInternal() {
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 81eddbc24879..e2afb2002150 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
|
||||
project(libunwind LANGUAGES C CXX ASM)
|
||||
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
set(PACKAGE_NAME libunwind)
|
||||
set(PACKAGE_VERSION 13.0.0git)
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
@@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH
|
||||
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
if(LIBCXX_LIBDIR_SUBDIR)
|
||||
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
|
||||
@@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
endif()
|
||||
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
|
||||
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
else()
|
||||
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
endif()
|
||||
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b5633e21c56a..f2f1035e9238 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH
|
||||
# If we are not building as part of LLVM, build LLDB as a standalone project,
|
||||
# using LLVM as an external library.
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
project(lldb)
|
||||
include(LLDBStandalone)
|
||||
|
||||
diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
|
||||
index 4ed5c647c5d2..89f96e710d55 100644
|
||||
--- a/cmake/modules/AddLLDB.cmake
|
||||
+++ b/cmake/modules/AddLLDB.cmake
|
||||
@@ -107,13 +107,13 @@ function(add_lldb_library name)
|
||||
endif()
|
||||
|
||||
if(PARAM_SHARED)
|
||||
- set(install_dest lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(PARAM_INSTALL_PREFIX)
|
||||
set(install_dest ${PARAM_INSTALL_PREFIX})
|
||||
endif()
|
||||
# RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
|
||||
install(TARGETS ${name} COMPONENT ${name}
|
||||
- RUNTIME DESTINATION bin
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${install_dest}
|
||||
ARCHIVE DESTINATION ${install_dest}
|
||||
FRAMEWORK DESTINATION ${install_dest})
|
||||
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
|
||||
index 2fdf1502d055..37364341ff8b 100644
|
||||
--- a/cmake/modules/LLDBConfig.cmake
|
||||
+++ b/cmake/modules/LLDBConfig.cmake
|
||||
@@ -225,7 +225,7 @@ include_directories(BEFORE
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/
|
||||
COMPONENT lldb-headers
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN ".cmake" EXCLUDE
|
||||
@@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
|
||||
COMPONENT lldb-headers
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN ".cmake" EXCLUDE
|
||||
diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
|
||||
index 734167e51bc5..f95761b5df58 100644
|
||||
--- a/tools/intel-features/CMakeLists.txt
|
||||
+++ b/tools/intel-features/CMakeLists.txt
|
||||
@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
|
||||
endif()
|
||||
|
||||
install(TARGETS lldbIntelFeatures
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
diff --git a/cmake/modules/LLDBStandalone.cmake b/cmake/modules/LLDBStandalone.cmake
|
||||
index 752113b..010f187 100644
|
||||
--- a/cmake/modules/LLDBStandalone.cmake
|
||||
+++ b/cmake/modules/LLDBStandalone.cmake
|
||||
@@ -62,7 +62,7 @@ endif()
|
||||
|
||||
# They are used as destination of target generators.
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
||||
-set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||
+set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 OR CYGWIN)
|
||||
# DLL platform -- put DLLs into bin.
|
||||
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b5633e2..86e4738 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -79,7 +79,7 @@ if (LLDB_ENABLE_PYTHON)
|
||||
if(LLDB_BUILD_FRAMEWORK)
|
||||
set(lldb_python_target_dir "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
|
||||
else()
|
||||
- set(lldb_python_target_dir "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
|
||||
+ set(lldb_python_target_dir "${CMAKE_INSTALL_LIBDIR}/../${LLDB_PYTHON_RELATIVE_PATH}/lldb")
|
||||
endif()
|
||||
get_target_property(lldb_python_bindings_dir swig_wrapper_python BINARY_DIR)
|
||||
finish_swig_python("lldb-python" "${lldb_python_bindings_dir}" "${lldb_python_target_dir}")
|
||||
diff --git a/source/API/CMakeLists.txt b/source/API/CMakeLists.txt
|
||||
index b5633e2..86e4738 100644
|
||||
--- a/source/API/CMakeLists.txt 2024-05-30 21:38:39.829955586 -0700
|
||||
+++ b/source/API/CMakeLists.txt 2024-05-30 21:38:48.015673758 -0700
|
||||
@@ -112,14 +112,6 @@
|
||||
${option_install_prefix}
|
||||
)
|
||||
|
||||
-# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
|
||||
-# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so
|
||||
-# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so
|
||||
-# that _lldb.so can be loaded from Python.
|
||||
-if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE)
|
||||
- set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
-endif()
|
||||
-
|
||||
if(Python3_RPATH)
|
||||
set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "${Python3_RPATH}")
|
||||
set_property(TARGET liblldb APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")
|
||||
|
|
@ -1,381 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 135036f509d2..265c36f8211b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -270,15 +270,21 @@ if (CMAKE_BUILD_TYPE AND
|
||||
message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
|
||||
|
||||
-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
|
||||
+set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
|
||||
+ "Path for binary subdirectory (defaults to 'bin')")
|
||||
mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
|
||||
|
||||
set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
|
||||
"Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
|
||||
mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
|
||||
|
||||
+set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
|
||||
+ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
|
||||
+
|
||||
# They are used as destination of target generators.
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
||||
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||
@@ -581,9 +587,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
|
||||
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
|
||||
option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
|
||||
|
||||
-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
|
||||
+set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
|
||||
CACHE STRING "Doxygen-generated HTML documentation install directory")
|
||||
-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
|
||||
+set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
|
||||
CACHE STRING "OCamldoc-generated HTML documentation install directory")
|
||||
|
||||
option (LLVM_BUILD_EXTERNAL_COMPILER_RT
|
||||
@@ -1048,7 +1054,7 @@ endif()
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
install(DIRECTORY include/llvm include/llvm-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT llvm-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
@@ -1059,7 +1065,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
)
|
||||
|
||||
install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT llvm-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
@@ -1073,13 +1079,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
|
||||
if (LLVM_INSTALL_MODULEMAPS)
|
||||
install(DIRECTORY include/llvm include/llvm-c
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT llvm-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "module.modulemap"
|
||||
)
|
||||
install(FILES include/llvm/module.install.modulemap
|
||||
- DESTINATION include/llvm
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
|
||||
COMPONENT llvm-headers
|
||||
RENAME "module.extern.modulemap"
|
||||
)
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index 9c2b85374307..5531ceeb2eeb 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -818,9 +818,9 @@ macro(add_llvm_library name)
|
||||
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
|
||||
install(TARGETS ${name}
|
||||
${export_to_llvmexports}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- RUNTIME DESTINATION bin COMPONENT ${name})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-${name}
|
||||
@@ -1036,7 +1036,7 @@ function(process_llvm_pass_plugins)
|
||||
"set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
|
||||
install(FILES
|
||||
${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
|
||||
- DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
+ DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
|
||||
COMPONENT cmake-exports)
|
||||
|
||||
set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
|
||||
@@ -1250,7 +1250,7 @@ macro(add_llvm_example name)
|
||||
endif()
|
||||
add_llvm_executable(${name} ${ARGN})
|
||||
if( LLVM_BUILD_EXAMPLES )
|
||||
- install(TARGETS ${name} RUNTIME DESTINATION examples)
|
||||
+ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
|
||||
endif()
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Examples")
|
||||
endmacro(add_llvm_example name)
|
||||
@@ -1868,7 +1868,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
|
||||
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 AND "${type}" STREQUAL "SHARED")
|
||||
set(output_dir bin)
|
||||
endif()
|
||||
@@ -1879,7 +1879,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
|
||||
endfunction()
|
||||
|
||||
-function(llvm_install_symlink name dest)
|
||||
+function(llvm_install_symlink name dest output_dir)
|
||||
cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
|
||||
foreach(path ${CMAKE_MODULE_PATH})
|
||||
if(EXISTS ${path}/LLVMInstallSymlink.cmake)
|
||||
@@ -1902,7 +1902,7 @@ function(llvm_install_symlink name dest)
|
||||
set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
install(SCRIPT ${INSTALL_SYMLINK}
|
||||
- CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
|
||||
+ CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
|
||||
COMPONENT ${component})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
|
||||
@@ -1985,7 +1985,8 @@ function(add_llvm_tool_symlink link_name target)
|
||||
endif()
|
||||
|
||||
if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
|
||||
- llvm_install_symlink(${link_name} ${target})
|
||||
+ GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
|
||||
+ llvm_install_symlink(${link_name} ${target} ${output_dir})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -2114,9 +2115,9 @@ function(llvm_setup_rpath name)
|
||||
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
|
||||
# hardcode the rpath to build/install lib dir first in this mode.
|
||||
# FIXME: update this when there is better solution.
|
||||
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(UNIX)
|
||||
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
|
||||
set_property(TARGET ${name} APPEND_STRING PROPERTY
|
||||
LINK_FLAGS " -Wl,-z,origin ")
|
||||
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
|
||||
index 554046b20edf..4d1ad980641e 100644
|
||||
--- a/cmake/modules/AddOCaml.cmake
|
||||
+++ b/cmake/modules/AddOCaml.cmake
|
||||
@@ -144,9 +144,9 @@ function(add_ocaml_library name)
|
||||
endforeach()
|
||||
|
||||
if( APPLE )
|
||||
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
|
||||
index e80c3b5c1cac..482f6d715ef5 100644
|
||||
--- a/cmake/modules/AddSphinxTarget.cmake
|
||||
+++ b/cmake/modules/AddSphinxTarget.cmake
|
||||
@@ -90,7 +90,7 @@ function (add_sphinx_target builder project)
|
||||
endif()
|
||||
elseif (builder STREQUAL html)
|
||||
string(TOUPPER "${project}" project_upper)
|
||||
- set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
|
||||
+ set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
|
||||
CACHE STRING "HTML documentation install directory for ${project}")
|
||||
|
||||
# '/.' indicates: copy the contents of the directory directly into
|
||||
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
|
||||
index 51b6a4fdc284..4adc2acfc074 100644
|
||||
--- a/cmake/modules/CMakeLists.txt
|
||||
+++ b/cmake/modules/CMakeLists.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
include(LLVMDistributionSupport)
|
||||
|
||||
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
|
||||
+set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
|
||||
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
|
||||
# First for users who use an installed LLVM, create the LLVMExports.cmake file.
|
||||
@@ -109,13 +109,13 @@ foreach(p ${_count})
|
||||
set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
|
||||
get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
|
||||
endforeach(p)
|
||||
-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
|
||||
+set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
|
||||
set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
|
||||
-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
|
||||
+set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
|
||||
set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
|
||||
-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
|
||||
+set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
# Generate a default location for lit
|
||||
if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
|
||||
diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
index 3e6a2c9a2648..52e14d955c60 100644
|
||||
--- a/cmake/modules/LLVMInstallSymlink.cmake
|
||||
+++ b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
function(install_symlink name target outdir)
|
||||
set(DESTDIR $ENV{DESTDIR})
|
||||
- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
|
||||
+ set(bindir "${DESTDIR}${outdir}/")
|
||||
|
||||
message(STATUS "Creating ${name}")
|
||||
|
||||
diff --git a/docs/CMake.rst b/docs/CMake.rst
|
||||
index f1ac2c7d4934..c6e1469b5e13 100644
|
||||
--- a/docs/CMake.rst
|
||||
+++ b/docs/CMake.rst
|
||||
@@ -202,7 +202,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
|
||||
**LLVM_LIBDIR_SUFFIX**:STRING
|
||||
Extra suffix to append to the directory where libraries are to be
|
||||
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
|
||||
- to install libraries to ``/usr/lib64``.
|
||||
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
|
||||
|
||||
Rarely-used CMake variables
|
||||
---------------------------
|
||||
@@ -551,8 +551,8 @@ LLVM-specific variables
|
||||
|
||||
**LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
|
||||
The path to install Doxygen-generated HTML documentation to. This path can
|
||||
- either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
|
||||
- `share/doc/llvm/doxygen-html`.
|
||||
+ either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
|
||||
+ `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
|
||||
|
||||
**LLVM_LINK_LLVM_DYLIB**:BOOL
|
||||
If enabled, tools will be linked with the libLLVM shared library. Defaults
|
||||
@@ -792,9 +792,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
|
||||
|
||||
This file is available in two different locations.
|
||||
|
||||
-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
|
||||
- ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
|
||||
- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
|
||||
+* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
|
||||
+ ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
|
||||
+ installed as part of an installed version of LLVM. This is typically
|
||||
+ ``cmake/llvm/`` within the lib directory. On Linux, this is typically
|
||||
+ ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
|
||||
|
||||
* ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
|
||||
``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
|
||||
diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt
|
||||
index bb96edb4b4bf..678c22fb43c8 100644
|
||||
--- a/examples/Bye/CMakeLists.txt
|
||||
+++ b/examples/Bye/CMakeLists.txt
|
||||
@@ -14,6 +14,6 @@ if (NOT WIN32)
|
||||
BUILDTREE_ONLY
|
||||
)
|
||||
|
||||
- install(TARGETS ${name} RUNTIME DESTINATION examples)
|
||||
+ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Examples")
|
||||
endif()
|
||||
diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
|
||||
index b46319f24fc8..2feabd1954e4 100644
|
||||
--- a/include/llvm/CMakeLists.txt
|
||||
+++ b/include/llvm/CMakeLists.txt
|
||||
@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
|
||||
# If we're doing an out-of-tree build, copy a module map for generated
|
||||
# header files into the build area.
|
||||
if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
- configure_file(module.modulemap.build module.modulemap COPYONLY)
|
||||
+ configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
|
||||
endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
|
||||
index ebe5b73a5c65..70c497be12f5 100644
|
||||
--- a/tools/llvm-config/BuildVariables.inc.in
|
||||
+++ b/tools/llvm-config/BuildVariables.inc.in
|
||||
@@ -23,6 +23,10 @@
|
||||
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
|
||||
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
|
||||
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
|
||||
+#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
|
||||
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
|
||||
+#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
+#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
|
||||
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
|
||||
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
|
||||
#define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
|
||||
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
||||
index 1a2f04552d13..44fa7d3eec6b 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -357,12 +357,26 @@ int main(int argc, char **argv) {
|
||||
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
|
||||
} else {
|
||||
ActivePrefix = CurrentExecPrefix;
|
||||
- ActiveIncludeDir = ActivePrefix + "/include";
|
||||
- SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
|
||||
- sys::fs::make_absolute(ActivePrefix, path);
|
||||
- ActiveBinDir = std::string(path.str());
|
||||
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
|
||||
- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveIncludeDir = std::string(path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveBinDir = std::string(path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveLibDir = std::string(path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
|
||||
+ sys::fs::make_absolute(ActivePrefix, path);
|
||||
+ ActiveCMakeDir = std::string(path.str());
|
||||
+ }
|
||||
ActiveIncludeOption = "-I" + ActiveIncludeDir;
|
||||
}
|
||||
|
||||
diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
|
||||
index 0af29ad762c5..37b99b83e35c 100644
|
||||
--- a/tools/lto/CMakeLists.txt
|
||||
+++ b/tools/lto/CMakeLists.txt
|
||||
@@ -33,7 +33,7 @@ add_llvm_library(${LTO_LIBRARY_NAME} ${LTO_LIBRARY_TYPE} INSTALL_WITH_TOOLCHAIN
|
||||
${SOURCES} DEPENDS intrinsics_gen)
|
||||
|
||||
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
|
||||
- DESTINATION include/llvm-c
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
|
||||
COMPONENT LTO)
|
||||
|
||||
if (APPLE)
|
||||
diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
|
||||
index ead73ec13a8f..250362021f17 100644
|
||||
--- a/tools/opt-viewer/CMakeLists.txt
|
||||
+++ b/tools/opt-viewer/CMakeLists.txt
|
||||
@@ -8,7 +8,7 @@ set (files
|
||||
|
||||
foreach (file ${files})
|
||||
install(PROGRAMS ${file}
|
||||
- DESTINATION share/opt-viewer
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
|
||||
COMPONENT opt-viewer)
|
||||
endforeach (file)
|
||||
|
||||
diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
|
||||
index 865436247270..ce1daa62f6ab 100644
|
||||
--- a/tools/remarks-shlib/CMakeLists.txt
|
||||
+++ b/tools/remarks-shlib/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC)
|
||||
endif()
|
||||
|
||||
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
|
||||
- DESTINATION include/llvm-c
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
|
||||
COMPONENT Remarks)
|
||||
|
||||
if (APPLE)
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
|
||||
index 9bbbfc032b7d..947bd0da865d 100644
|
||||
--- a/cmake/modules/AddClang.cmake
|
||||
+++ b/cmake/modules/AddClang.cmake
|
||||
@@ -119,8 +119,8 @@ macro(add_clang_library name)
|
||||
install(TARGETS ${lib}
|
||||
COMPONENT ${lib}
|
||||
${export_to_clangtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
@@ -175,7 +175,7 @@ endmacro()
|
||||
macro(add_clang_symlink name dest)
|
||||
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
# Always generate install targets
|
||||
- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
+ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
|
||||
endmacro()
|
||||
|
||||
function(clang_target_link_libraries target type)
|
||||
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
|
||||
index 078988980c52..14b58614b40a 100644
|
||||
--- a/lib/Headers/CMakeLists.txt
|
||||
+++ b/lib/Headers/CMakeLists.txt
|
||||
@@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES
|
||||
FOLDER "Misc"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
|
||||
|
||||
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
||||
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
||||
|
||||
install(
|
||||
FILES ${files} ${generated_files}
|
||||
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
|
||||
index 4e0647971ab4..68dd67fcc476 100644
|
||||
--- a/tools/libclang/CMakeLists.txt
|
||||
+++ b/tools/libclang/CMakeLists.txt
|
||||
@@ -216,7 +216,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
|
||||
COMPONENT
|
||||
libclang-python-bindings
|
||||
DESTINATION
|
||||
- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
+ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
endforeach()
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
add_custom_target(libclang-python-bindings)
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
From a56bb19a9dc303a50ef12d83cd24c2395bf81076 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Wolsieffer <benwolsieffer@gmail.com>
|
||||
Date: Wed, 7 Dec 2022 21:25:46 -0500
|
||||
Subject: [PATCH] [scudo][standalone] Use CheckAtomic to decide to link to
|
||||
libatomic
|
||||
|
||||
Standalone scudo uses the atomic operation builtin functions, which require
|
||||
linking to libatomic on some platforms. Currently, this is done in an ad-hoc
|
||||
manner. MIPS platforms always link to libatomic, and the tests are always linked
|
||||
to it as well. libatomic is required on base ARMv6 (but not ARMv6K), but it is
|
||||
currently not linked, causing the build to fail.
|
||||
|
||||
This patch replaces this ad-hoc logic with the CheckAtomic CMake module already
|
||||
used in other parts of LLVM. The CheckAtomic module checks whether std::atomic
|
||||
requires libatomic, which is not strictly the same as checking the atomic
|
||||
builtins, but should have the same results as far as I know. If this is
|
||||
problematic, a custom version of CheckAtomic could be used to specifically test
|
||||
the builtins.
|
||||
---
|
||||
compiler-rt/lib/scudo/standalone/CMakeLists.txt | 7 +++++++
|
||||
compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt | 4 +---
|
||||
2 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/scudo/standalone/CMakeLists.txt b/lib/scudo/standalone/CMakeLists.txt
|
||||
index ae5c354768c8..eb27374ca520 100644
|
||||
--- a/lib/scudo/standalone/CMakeLists.txt
|
||||
+++ b/lib/scudo/standalone/CMakeLists.txt
|
||||
@@ -1,5 +1,8 @@
|
||||
add_compiler_rt_component(scudo_standalone)
|
||||
|
||||
+include(DetermineGCCCompatible)
|
||||
+include(CheckAtomic)
|
||||
+
|
||||
include_directories(../.. include)
|
||||
|
||||
set(SCUDO_CFLAGS)
|
||||
@@ -34,6 +37,10 @@ list(APPEND SCUDO_LINK_FLAGS -Wl,-z,defs,-z,now,-z,relro)
|
||||
|
||||
list(APPEND SCUDO_LINK_FLAGS -ffunction-sections -fdata-sections -Wl,--gc-sections)
|
||||
|
||||
+if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
+ list(APPEND SCUDO_LINK_FLAGS -latomic)
|
||||
+endif()
|
||||
+
|
||||
# We don't use the C++ standard library, so avoid including it by mistake.
|
||||
append_list_if(COMPILER_RT_HAS_NOSTDLIBXX_FLAG -nostdlib++ SCUDO_LINK_FLAGS)
|
||||
|
||||
diff --git a/lib/scudo/standalone/tests/CMakeLists.txt b/lib/scudo/standalone/tests/CMakeLists.txt
|
||||
index 6d0936cbb5c1..70a5a7e959c1 100644
|
||||
--- a/lib/scudo/standalone/tests/CMakeLists.txt
|
||||
+++ b/lib/scudo/standalone/tests/CMakeLists.txt
|
||||
@@ -38,9 +38,7 @@ set(LINK_FLAGS
|
||||
${SANITIZER_TEST_CXX_LIBRARIES}
|
||||
)
|
||||
list(APPEND LINK_FLAGS -pthread)
|
||||
-# Linking against libatomic is required with some compilers
|
||||
-check_library_exists(atomic __atomic_load_8 "" COMPILER_RT_HAS_LIBATOMIC)
|
||||
-if (COMPILER_RT_HAS_LIBATOMIC)
|
||||
+if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
list(APPEND LINK_FLAGS -latomic)
|
||||
endif()
|
||||
|
||||
--
|
||||
2.38.1
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3a41aa43e406..f000cee6eae0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.13.4)
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
# Check if compiler-rt is built as a standalone project.
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
|
||||
project(CompilerRT C CXX ASM)
|
||||
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
|
||||
index d7b0124f3546..3e111146df4d 100644
|
||||
--- a/cmake/base-config-ix.cmake
|
||||
+++ b/cmake/base-config-ix.cmake
|
||||
@@ -67,7 +67,7 @@ if (LLVM_TREE_AVAILABLE)
|
||||
else()
|
||||
# Take output dir and install path from the user.
|
||||
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
|
||||
- "Path where built compiler-rt libraries should be stored.")
|
||||
+ "Path where built compiler-rt build artifacts should be stored.")
|
||||
set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
|
||||
"Path where built compiler-rt executables should be stored.")
|
||||
set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
|
||||
@@ -99,13 +99,13 @@ endif()
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
|
||||
${COMPILER_RT_OUTPUT_DIR}/lib)
|
||||
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
|
||||
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
|
||||
"Path where built compiler-rt libraries should be installed.")
|
||||
else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
|
||||
${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
|
||||
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
|
||||
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
|
||||
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
|
||||
"Path where built compiler-rt libraries should be installed.")
|
||||
endif()
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -147,7 +147,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
|
||||
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
if(LIBCXX_LIBDIR_SUBDIR)
|
||||
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
|
||||
@@ -159,7 +159,7 @@ else()
|
||||
else()
|
||||
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
endif()
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9bcc135665d0..d38679ed41e9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -74,7 +74,7 @@ if(LLD_BUILT_STANDALONE)
|
||||
|
||||
set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
|
||||
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
|
||||
- set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
|
||||
+ set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
|
||||
|
||||
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
|
||||
index dd2898ce6236..ebbea040ff54 100644
|
||||
--- a/cmake/modules/AddLLD.cmake
|
||||
+++ b/cmake/modules/AddLLD.cmake
|
||||
@@ -18,8 +18,8 @@ macro(add_lld_library name)
|
||||
install(TARGETS ${name}
|
||||
COMPONENT ${name}
|
||||
${export_to_lldtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
@@ -62,5 +62,5 @@ endmacro()
|
||||
macro(add_lld_symlink name dest)
|
||||
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
# Always generate install targets
|
||||
- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
|
||||
+ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
|
||||
endmacro()
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
This is the one remaining Polly install dirs related change that hasn't made it
|
||||
into upstream yet; previously this patch file also included:
|
||||
https://reviews.llvm.org/D117541
|
||||
|
||||
diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
|
||||
index 518a09b45a42..bd9d6f5542ad 100644
|
||||
--- a/tools/polly/cmake/polly_macros.cmake
|
||||
+++ b/tools/polly/cmake/polly_macros.cmake
|
||||
@@ -44,8 +44,8 @@ macro(add_polly_library name)
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
|
||||
install(TARGETS ${name}
|
||||
EXPORT LLVMExports
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
|
||||
endmacro(add_polly_library)
|
||||
|
|
@ -1,220 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fec956091cd5..5a766f5c5d7c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -303,6 +303,9 @@ set(LLVM_EXAMPLES_INSTALL_DIR "examples" CACHE STRING
|
||||
"Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON) (defaults to 'examples')")
|
||||
mark_as_advanced(LLVM_EXAMPLES_INSTALL_DIR)
|
||||
|
||||
+set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
|
||||
+ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
|
||||
+
|
||||
# They are used as destination of target generators.
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
||||
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index fed1fec7d72e..4baed19b9e98 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -838,8 +838,8 @@ macro(add_llvm_library name)
|
||||
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
|
||||
install(TARGETS ${name}
|
||||
${export_to_llvmexports}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
@@ -1056,7 +1056,7 @@ function(process_llvm_pass_plugins)
|
||||
"set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
|
||||
install(FILES
|
||||
${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
|
||||
- DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
+ DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
|
||||
COMPONENT cmake-exports)
|
||||
|
||||
set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
|
||||
@@ -1902,7 +1902,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
|
||||
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 AND "${type}" STREQUAL "SHARED")
|
||||
set(output_dir bin)
|
||||
endif()
|
||||
@@ -1913,7 +1913,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
|
||||
endfunction()
|
||||
|
||||
-function(llvm_install_symlink name dest)
|
||||
+function(llvm_install_symlink name dest output_dir)
|
||||
cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
|
||||
foreach(path ${CMAKE_MODULE_PATH})
|
||||
if(EXISTS ${path}/LLVMInstallSymlink.cmake)
|
||||
@@ -1936,7 +1936,7 @@ function(llvm_install_symlink name dest)
|
||||
set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
install(SCRIPT ${INSTALL_SYMLINK}
|
||||
- CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
|
||||
+ CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
|
||||
COMPONENT ${component})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
|
||||
@@ -2019,7 +2019,8 @@ function(add_llvm_tool_symlink link_name target)
|
||||
endif()
|
||||
|
||||
if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
|
||||
- llvm_install_symlink(${link_name} ${target})
|
||||
+ GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
|
||||
+ llvm_install_symlink(${link_name} ${target} ${output_dir})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -2148,9 +2149,9 @@ function(llvm_setup_rpath name)
|
||||
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
|
||||
# hardcode the rpath to build/install lib dir first in this mode.
|
||||
# FIXME: update this when there is better solution.
|
||||
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(UNIX)
|
||||
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
|
||||
set_property(TARGET ${name} APPEND_STRING PROPERTY
|
||||
LINK_FLAGS " -Wl,-z,origin ")
|
||||
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
|
||||
index 891c9e6d618c..8d963f3b0069 100644
|
||||
--- a/cmake/modules/AddOCaml.cmake
|
||||
+++ b/cmake/modules/AddOCaml.cmake
|
||||
@@ -147,9 +147,9 @@ function(add_ocaml_library name)
|
||||
endforeach()
|
||||
|
||||
if( APPLE )
|
||||
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
|
||||
index cea0c1df0a14..eedcd9450312 100644
|
||||
--- a/cmake/modules/CMakeLists.txt
|
||||
+++ b/cmake/modules/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ include(ExtendPath)
|
||||
include(LLVMDistributionSupport)
|
||||
include(FindPrefixFromConfig)
|
||||
|
||||
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
|
||||
+set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
|
||||
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
|
||||
# First for users who use an installed LLVM, create the LLVMExports.cmake file.
|
||||
@@ -122,7 +122,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
|
||||
)
|
||||
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
|
||||
|
||||
-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
|
||||
+extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
|
||||
set(LLVM_CONFIG_LIBRARY_DIRS
|
||||
"${LLVM_CONFIG_LIBRARY_DIR}"
|
||||
# FIXME: Should there be other entries here?
|
||||
diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
index b5c35f706cb7..9261ab797de6 100644
|
||||
--- a/cmake/modules/LLVMInstallSymlink.cmake
|
||||
+++ b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
@@ -6,7 +6,7 @@ include(GNUInstallDirs)
|
||||
|
||||
function(install_symlink name target outdir)
|
||||
set(DESTDIR $ENV{DESTDIR})
|
||||
- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}")
|
||||
+ set(bindir "${DESTDIR}${outdir}/")
|
||||
|
||||
message(STATUS "Creating ${name}")
|
||||
|
||||
diff --git a/docs/CMake.rst b/docs/CMake.rst
|
||||
index 044ec8a4d39d..504d0eac3ade 100644
|
||||
--- a/docs/CMake.rst
|
||||
+++ b/docs/CMake.rst
|
||||
@@ -224,7 +224,7 @@ description is in `LLVM-related variables`_ below.
|
||||
**LLVM_LIBDIR_SUFFIX**:STRING
|
||||
Extra suffix to append to the directory where libraries are to be
|
||||
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
|
||||
- to install libraries to ``/usr/lib64``.
|
||||
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
|
||||
|
||||
**LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
|
||||
Building the llvm toolchain can use a lot of resources, particularly
|
||||
@@ -910,9 +910,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
|
||||
|
||||
This file is available in two different locations.
|
||||
|
||||
-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
|
||||
- ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
|
||||
- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
|
||||
+* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
|
||||
+ ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
|
||||
+ installed as part of an installed version of LLVM. This is typically
|
||||
+ ``cmake/llvm/`` within the lib directory. On Linux, this is typically
|
||||
+ ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
|
||||
|
||||
* ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
|
||||
``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
|
||||
diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
|
||||
index b46319f24fc8..2feabd1954e4 100644
|
||||
--- a/include/llvm/CMakeLists.txt
|
||||
+++ b/include/llvm/CMakeLists.txt
|
||||
@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
|
||||
# If we're doing an out-of-tree build, copy a module map for generated
|
||||
# header files into the build area.
|
||||
if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
- configure_file(module.modulemap.build module.modulemap COPYONLY)
|
||||
+ configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
|
||||
endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
|
||||
index abbb8a450da6..70c497be12f5 100644
|
||||
--- a/tools/llvm-config/BuildVariables.inc.in
|
||||
+++ b/tools/llvm-config/BuildVariables.inc.in
|
||||
@@ -23,7 +23,10 @@
|
||||
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
|
||||
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
|
||||
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
|
||||
+#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
|
||||
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
|
||||
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
+#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
|
||||
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
|
||||
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
|
||||
#define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
|
||||
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
||||
index 8ed88f33ead4..5e7184bab90d 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -363,12 +363,20 @@ int main(int argc, char **argv) {
|
||||
ActiveIncludeDir = std::string(Path.str());
|
||||
}
|
||||
{
|
||||
- SmallString<256> Path(LLVM_TOOLS_INSTALL_DIR);
|
||||
+ SmallString<256> Path(LLVM_INSTALL_BINDIR);
|
||||
sys::fs::make_absolute(ActivePrefix, Path);
|
||||
ActiveBinDir = std::string(Path.str());
|
||||
}
|
||||
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
|
||||
- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
|
||||
+ {
|
||||
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
|
||||
+ sys::fs::make_absolute(ActivePrefix, Path);
|
||||
+ ActiveLibDir = std::string(Path.str());
|
||||
+ }
|
||||
+ {
|
||||
+ SmallString<256> Path(LLVM_INSTALL_CMAKEDIR);
|
||||
+ sys::fs::make_absolute(ActivePrefix, Path);
|
||||
+ ActiveCMakeDir = std::string(Path.str());
|
||||
+ }
|
||||
ActiveIncludeOption = "-I" + ActiveIncludeDir;
|
||||
}
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@ if (OPENMP_STANDALONE_BUILD)
|
||||
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
|
||||
"Suffix of lib installation directory, e.g. 64 => lib64")
|
||||
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
|
||||
- set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
|
||||
+ set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
|
||||
|
||||
# Group test settings.
|
||||
set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
|
||||
@@ -35,7 +35,7 @@ if (OPENMP_STANDALONE_BUILD)
|
||||
else()
|
||||
set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
|
||||
# If building in tree, we honor the same install suffix LLVM uses.
|
||||
- set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
|
||||
if (NOT MSVC)
|
||||
set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
|
||||
diff --git a/libomptarget/plugins/amdgpu/CMakeLists.txt b/libomptarget/plugins/amdgpu/CMakeLists.txt
|
||||
--- a/libomptarget/plugins/amdgpu/CMakeLists.txt
|
||||
+++ b/libomptarget/plugins/amdgpu/CMakeLists.txt
|
||||
@@ -74,7 +74,7 @@ add_library(omptarget.rtl.amdgpu SHARED
|
||||
|
||||
# Install plugin under the lib destination folder.
|
||||
# When we build for debug, OPENMP_LIBDIR_SUFFIX get set to -debug
|
||||
-install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "lib${OPENMP_LIBDIR_SUFFIX}")
|
||||
+install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
|
||||
set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
diff --git a/libomptarget/plugins/ve/CMakeLists.txt b/libomptarget/plugins/ve/CMakeLists.txt
|
||||
--- a/libomptarget/plugins/ve/CMakeLists.txt
|
||||
+++ b/libomptarget/plugins/ve/CMakeLists.txt
|
||||
@@ -32,7 +32,7 @@ if(${LIBOMPTARGET_DEP_VEO_FOUND})
|
||||
|
||||
# Install plugin under the lib destination folder.
|
||||
install(TARGETS "omptarget.rtl.${tmachine_libname}"
|
||||
- LIBRARY DESTINATION lib${OPENMP_LIBDIR_SUFFIX})
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX})
|
||||
|
||||
target_link_libraries(
|
||||
"omptarget.rtl.${tmachine_libname}"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake
|
||||
--- a/cmake/OpenMPTesting.cmake
|
||||
+++ b/cmake/OpenMPTesting.cmake
|
||||
@@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment)
|
||||
if (${OPENMP_STANDALONE_BUILD})
|
||||
set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
|
||||
add_custom_target(${target}
|
||||
- COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
|
||||
+ COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
|
||||
COMMENT ${comment}
|
||||
DEPENDS ${ARG_DEPENDS}
|
||||
USES_TERMINAL
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c27beec313d7..480f13e73c9f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -78,15 +78,17 @@ if(CLANG_BUILT_STANDALONE)
|
||||
if (NOT LLVM_CONFIG_FOUND)
|
||||
# Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
|
||||
# path is removed.
|
||||
- set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
|
||||
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
|
||||
set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
|
||||
# N.B. this is just a default value, the CACHE PATHs below can be overriden.
|
||||
set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
|
||||
set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
|
||||
set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
|
||||
+ else()
|
||||
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
- set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
|
||||
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
|
||||
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
|
||||
set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
|
||||
set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
|
||||
@@ -128,7 +130,7 @@ if(CLANG_BUILT_STANDALONE)
|
||||
set(LLVM_INCLUDE_TESTS ON)
|
||||
endif()
|
||||
|
||||
- include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
|
||||
+ include_directories(${LLVM_INCLUDE_DIRS})
|
||||
link_directories("${LLVM_LIBRARY_DIR}")
|
||||
|
||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
|
||||
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
|
||||
index 21ac332e4f5f..b16c314bd1e2 100644
|
||||
--- a/cmake/modules/AddClang.cmake
|
||||
+++ b/cmake/modules/AddClang.cmake
|
||||
@@ -119,8 +119,8 @@ macro(add_clang_library name)
|
||||
install(TARGETS ${lib}
|
||||
COMPONENT ${lib}
|
||||
${export_to_clangtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
|
||||
index 6e2060991b92..b9bc930d26b8 100644
|
||||
--- a/lib/Headers/CMakeLists.txt
|
||||
+++ b/lib/Headers/CMakeLists.txt
|
||||
@@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
|
||||
add_header_target("windows-resource-headers" ${windows_only_files})
|
||||
add_header_target("utility-resource-headers" ${utility_files})
|
||||
|
||||
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
||||
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
|
||||
|
||||
#############################################################
|
||||
# Install rules for the catch-all clang-resource-headers target
|
||||
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
|
||||
index 8d95d0900e8c..ebc70ff7526d 100644
|
||||
--- a/tools/libclang/CMakeLists.txt
|
||||
+++ b/tools/libclang/CMakeLists.txt
|
||||
@@ -180,7 +180,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
|
||||
COMPONENT
|
||||
libclang-python-bindings
|
||||
DESTINATION
|
||||
- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
+ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
endforeach()
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
add_custom_target(libclang-python-bindings)
|
||||
diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
|
||||
index 061dc7ef4dd9..adc54b2edc32 100644
|
||||
--- a/tools/scan-build-py/CMakeLists.txt
|
||||
+++ b/tools/scan-build-py/CMakeLists.txt
|
||||
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
|
||||
install(PROGRAMS lib/libscanbuild/${lib}
|
||||
- DESTINATION lib/libscanbuild
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
|
||||
COMPONENT scan-build-py)
|
||||
endforeach()
|
||||
|
||||
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
|
||||
install(PROGRAMS lib/libscanbuild/resources/${resource}
|
||||
- DESTINATION lib/libscanbuild/resources
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
|
||||
COMPONENT scan-build-py)
|
||||
endforeach()
|
||||
|
||||
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
|
||||
install(PROGRAMS lib/libear/${lib}
|
||||
- DESTINATION lib/libear
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
|
||||
COMPONENT scan-build-py)
|
||||
endforeach()
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Thu, 18 May 2017 11:56:12 -0500
|
||||
Subject: [PATCH] "purity" patch for 5.0
|
||||
|
||||
---
|
||||
lib/Driver/ToolChains/Gnu.cpp | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
|
||||
index fe3c0191bb..c6a482bece 100644
|
||||
--- a/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ b/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
} else {
|
||||
if (Args.hasArg(options::OPT_rdynamic))
|
||||
CmdArgs.push_back("-export-dynamic");
|
||||
|
||||
- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE &&
|
||||
- !Args.hasArg(options::OPT_r)) {
|
||||
- CmdArgs.push_back("-dynamic-linker");
|
||||
- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
|
||||
- ToolChain.getDynamicLinker(Args)));
|
||||
- }
|
||||
}
|
||||
|
||||
CmdArgs.push_back("-o");
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
|
||||
index 8a6219568b3f..30ee68a47ccf 100644
|
||||
--- a/cmake/base-config-ix.cmake
|
||||
+++ b/cmake/base-config-ix.cmake
|
||||
@@ -100,13 +100,13 @@ endif()
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
|
||||
${COMPILER_RT_OUTPUT_DIR}/lib)
|
||||
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
|
||||
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}")
|
||||
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
|
||||
"Path where built compiler-rt libraries should be installed.")
|
||||
else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
|
||||
${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
|
||||
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")
|
||||
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}")
|
||||
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
|
||||
"Path where built compiler-rt libraries should be installed.")
|
||||
endif()
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5a06805f05f1..86a50329e6a8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
|
||||
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
if(LIBCXX_LIBDIR_SUBDIR)
|
||||
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
|
||||
@@ -129,7 +129,7 @@ else()
|
||||
else()
|
||||
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
|
||||
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
|
||||
"Path where built libunwind libraries should be installed.")
|
||||
endif()
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index dcc649629a4b..58dca54642e4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,13 +70,15 @@ if(LLD_BUILT_STANDALONE)
|
||||
if (NOT LLVM_CONFIG_FOUND)
|
||||
# Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
|
||||
# path is removed.
|
||||
- set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
|
||||
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
|
||||
set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
|
||||
# N.B. this is just a default value, the CACHE PATHs below can be overridden.
|
||||
set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
|
||||
+ else()
|
||||
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
- set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
|
||||
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
|
||||
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
|
||||
set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
|
||||
|
||||
@@ -95,7 +97,7 @@ if(LLD_BUILT_STANDALONE)
|
||||
|
||||
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
|
||||
|
||||
- include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS})
|
||||
+ include_directories(${LLVM_INCLUDE_DIRS})
|
||||
link_directories(${LLVM_LIBRARY_DIRS})
|
||||
|
||||
if(LLVM_INCLUDE_TESTS)
|
||||
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
|
||||
index d3924f7243d4..42a7cd62281c 100644
|
||||
--- a/cmake/modules/AddLLD.cmake
|
||||
+++ b/cmake/modules/AddLLD.cmake
|
||||
@@ -18,8 +18,8 @@ macro(add_lld_library name)
|
||||
install(TARGETS ${name}
|
||||
COMPONENT ${name}
|
||||
${export_to_lldtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
--- a/source/Plugins/Process/Linux/Procfs.h
|
||||
+++ b/source/Plugins/Process/Linux/Procfs.h
|
||||
@@ -10,6 +10,13 @@
|
||||
// sys/procfs.h on Android/Linux for all supported architectures.
|
||||
|
||||
#include <sys/ptrace.h>
|
||||
+#include <asm/ptrace.h>
|
||||
+
|
||||
+// on i686 preprocessor symbols with these register names are defined as
|
||||
+// numeric constants; these symbols clash with identifier names used in
|
||||
+// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
|
||||
+#undef FS
|
||||
+#undef CS
|
||||
|
||||
#include "lldb/lldb-types.h"
|
||||
|
||||
@@ -17,23 +24,13 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
-#if defined(__arm64__) || defined(__aarch64__)
|
||||
-typedef unsigned long elf_greg_t;
|
||||
-typedef elf_greg_t
|
||||
- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
|
||||
-typedef struct user_fpsimd_state elf_fpregset_t;
|
||||
-#ifndef NT_FPREGSET
|
||||
-#define NT_FPREGSET NT_PRFPREG
|
||||
-#endif // NT_FPREGSET
|
||||
-#elif defined(__mips__)
|
||||
-#ifndef NT_FPREGSET
|
||||
-#define NT_FPREGSET NT_PRFPREG
|
||||
-#endif // NT_FPREGSET
|
||||
-#endif
|
||||
-#else // __ANDROID__
|
||||
+#if !defined(__GLIBC__) && defined(__powerpc__)
|
||||
+#define pt_regs musl_pt_regs
|
||||
+#include <sys/procfs.h>
|
||||
+#undef pt_regs
|
||||
+#else
|
||||
#include <sys/procfs.h>
|
||||
-#endif // __ANDROID__
|
||||
+#endif
|
||||
|
||||
namespace lldb_private {
|
||||
namespace process_linux {
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 45399dc0537e..5d946e9e6583 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -942,7 +942,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
|
||||
add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
|
||||
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
|
||||
install(TARGETS tf_xla_runtime EXPORT LLVMExports
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
|
||||
# Once we add more modules, we should handle this more automatically.
|
||||
if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index 057431208322..56f0dcb258da 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -844,8 +844,8 @@ macro(add_llvm_library name)
|
||||
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
|
||||
install(TARGETS ${name}
|
||||
${export_to_llvmexports}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
@@ -2007,7 +2007,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
|
||||
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 AND "${type}" STREQUAL "SHARED")
|
||||
set(output_dir "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
@@ -2271,15 +2271,15 @@ function(llvm_setup_rpath name)
|
||||
|
||||
if (APPLE)
|
||||
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
|
||||
- set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
|
||||
# $ORIGIN is not interpreted at link time by aix ld.
|
||||
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
|
||||
# hardcode the rpath to build/install lib dir first in this mode.
|
||||
# FIXME: update this when there is better solution.
|
||||
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(UNIX)
|
||||
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
|
||||
set_property(TARGET ${name} APPEND_STRING PROPERTY
|
||||
LINK_FLAGS " -Wl,-z,origin ")
|
||||
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
|
||||
index 891c9e6d618c..8d963f3b0069 100644
|
||||
--- a/cmake/modules/AddOCaml.cmake
|
||||
+++ b/cmake/modules/AddOCaml.cmake
|
||||
@@ -147,9 +147,9 @@ function(add_ocaml_library name)
|
||||
endforeach()
|
||||
|
||||
if( APPLE )
|
||||
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
|
||||
index d4b0ab959148..26ed981fd09f 100644
|
||||
--- a/cmake/modules/CMakeLists.txt
|
||||
+++ b/cmake/modules/CMakeLists.txt
|
||||
@@ -128,7 +128,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
|
||||
)
|
||||
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
|
||||
|
||||
-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
|
||||
+extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
|
||||
set(LLVM_CONFIG_LIBRARY_DIRS
|
||||
"${LLVM_CONFIG_LIBRARY_DIR}"
|
||||
# FIXME: Should there be other entries here?
|
||||
diff --git a/docs/CMake.rst b/docs/CMake.rst
|
||||
index 879b7b231d4c..9c31d14e8950 100644
|
||||
--- a/docs/CMake.rst
|
||||
+++ b/docs/CMake.rst
|
||||
@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
|
||||
**LLVM_LIBDIR_SUFFIX**:STRING
|
||||
Extra suffix to append to the directory where libraries are to be
|
||||
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
|
||||
- to install libraries to ``/usr/lib64``.
|
||||
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
|
||||
|
||||
**LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
|
||||
Building the llvm toolchain can use a lot of resources, particularly
|
||||
@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
|
||||
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
|
||||
Defaults to "bin".
|
||||
|
||||
+**CMAKE_INSTALL_LIBDIR**:PATH
|
||||
+ The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
|
||||
+ Defaults to "lib".
|
||||
+
|
||||
**CMAKE_INSTALL_INCLUDEDIR**:PATH
|
||||
The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
|
||||
Defaults to "include".
|
||||
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
|
||||
index 370005cd8d7d..7e790bc52111 100644
|
||||
--- a/tools/llvm-config/BuildVariables.inc.in
|
||||
+++ b/tools/llvm-config/BuildVariables.inc.in
|
||||
@@ -23,6 +23,7 @@
|
||||
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
|
||||
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
|
||||
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
|
||||
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
|
||||
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
#define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
|
||||
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
|
||||
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
||||
index 2c6c55f89d38..f6d2068a0827 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -369,7 +369,11 @@ int main(int argc, char **argv) {
|
||||
sys::fs::make_absolute(ActivePrefix, Path);
|
||||
ActiveBinDir = std::string(Path.str());
|
||||
}
|
||||
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
|
||||
+ {
|
||||
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
|
||||
+ sys::fs::make_absolute(ActivePrefix, Path);
|
||||
+ ActiveLibDir = std::string(Path.str());
|
||||
+ }
|
||||
{
|
||||
SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
|
||||
sys::fs::make_absolute(ActivePrefix, Path);
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
|
||||
index 0242e0b75af3..d732011306f7 100644
|
||||
--- a/utils/lit/lit/TestRunner.py
|
||||
+++ b/utils/lit/lit/TestRunner.py
|
||||
@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
|
||||
f.write('@echo off\n')
|
||||
f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
|
||||
else:
|
||||
+ # This env var is *purged* when invoking subprocesses so we have to
|
||||
+ # manually set it from within the bash script in order for the commands
|
||||
+ # in run lines to see this var:
|
||||
+ if "DYLD_LIBRARY_PATH" in test.config.environment:
|
||||
+ f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
|
||||
+
|
||||
for i, ln in enumerate(commands):
|
||||
match = re.match(kPdbgRegex, ln)
|
||||
if match:
|
||||
@@ -1363,7 +1369,7 @@ def applySubstitutions(script, substitutions, conditions={},
|
||||
return processed
|
||||
|
||||
process = processLine if recursion_limit is None else processLineToFixedPoint
|
||||
-
|
||||
+
|
||||
return [unescapePercents(process(ln)) for ln in script]
|
||||
|
||||
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
diff --git a/test/Unit/lit.cfg.py b/test/Unit/lit.cfg.py
|
||||
index 81e8dc04acea..479ff95681e2 100644
|
||||
--- a/test/Unit/lit.cfg.py
|
||||
+++ b/test/Unit/lit.cfg.py
|
||||
@@ -3,6 +3,7 @@
|
||||
# Configuration file for the 'lit' test runner.
|
||||
|
||||
import os
|
||||
+import platform
|
||||
import subprocess
|
||||
|
||||
import lit.formats
|
||||
@@ -55,3 +56,26 @@ if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
|
||||
# Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
|
||||
if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ:
|
||||
config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE']
|
||||
+
|
||||
+# Add the LLVM dynamic libs to the platform-specific loader search path env var:
|
||||
+#
|
||||
+# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
|
||||
+def find_shlibpath_var():
|
||||
+ if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
|
||||
+ yield 'LD_LIBRARY_PATH'
|
||||
+ elif platform.system() == 'Darwin':
|
||||
+ yield 'DYLD_LIBRARY_PATH'
|
||||
+ elif platform.system() == 'Windows':
|
||||
+ yield 'PATH'
|
||||
+ elif platform.system() == 'AIX':
|
||||
+ yield 'LIBPATH'
|
||||
+
|
||||
+for shlibpath_var in find_shlibpath_var():
|
||||
+ shlibpath = os.path.pathsep.join(
|
||||
+ (config.shlibdir,
|
||||
+ config.environment.get(shlibpath_var, '')))
|
||||
+ config.environment[shlibpath_var] = shlibpath
|
||||
+ break
|
||||
+else:
|
||||
+ lit_config.warning("unable to inject shared library path on '{}'"
|
||||
+ .format(platform.system()))
|
||||
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
|
||||
index 75a38b4c5dad..856fc75c9d74 100644
|
||||
--- a/test/lit.cfg.py
|
||||
+++ b/test/lit.cfg.py
|
||||
@@ -42,6 +42,26 @@ llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
|
||||
llvm_config.with_system_environment(
|
||||
['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP'])
|
||||
|
||||
+# Add the LLVM dynamic libs to the platform-specific loader search path env var:
|
||||
+#
|
||||
+# TODO: this is copied from `clang`'s `lit.cfg.py`; should unify..
|
||||
+def find_shlibpath_var():
|
||||
+ if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'OpenBSD', 'SunOS']:
|
||||
+ yield 'LD_LIBRARY_PATH'
|
||||
+ elif platform.system() == 'Darwin':
|
||||
+ yield 'DYLD_LIBRARY_PATH'
|
||||
+ elif platform.system() == 'Windows':
|
||||
+ yield 'PATH'
|
||||
+ elif platform.system() == 'AIX':
|
||||
+ yield 'LIBPATH'
|
||||
+
|
||||
+for shlibpath_var in find_shlibpath_var():
|
||||
+ shlibpath = config.llvm_shlib_dir
|
||||
+ llvm_config.with_environment(shlibpath_var, shlibpath, append_path = True)
|
||||
+ break
|
||||
+else:
|
||||
+ lit_config.warning("unable to inject shared library path on '{}'"
|
||||
+ .format(platform.system()))
|
||||
|
||||
# Set up OCAMLPATH to include newly built OCaml libraries.
|
||||
top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml')
|
||||
@@ -318,7 +338,7 @@ def have_cxx_shared_library():
|
||||
|
||||
try:
|
||||
readobj_cmd = subprocess.Popen(
|
||||
- [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE)
|
||||
+ [readobj_exe, '--needed-libs', readobj_exe], stdout=subprocess.PIPE, env=config.environment)
|
||||
except OSError:
|
||||
print('could not exec llvm-readobj')
|
||||
return False
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
|
||||
index ce66214822a2..6ab7b33c95da 100644
|
||||
--- a/libomptarget/DeviceRTL/CMakeLists.txt
|
||||
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
|
||||
@@ -27,10 +27,10 @@ endif()
|
||||
if (LLVM_DIR)
|
||||
# Builds that use pre-installed LLVM have LLVM_DIR set.
|
||||
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
|
||||
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
|
||||
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
|
||||
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
|
||||
- NO_DEFAULT_PATH)
|
||||
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
|
||||
+ )
|
||||
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
|
||||
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
|
||||
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
|
||||
return()
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b6ddbe90516d..311ab1d50e7f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
|
||||
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
|
||||
"Suffix of lib installation directory, e.g. 64 => lib64")
|
||||
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
|
||||
- set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}")
|
||||
+ set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
|
||||
|
||||
# Group test settings.
|
||||
set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
|
||||
@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
|
||||
else()
|
||||
set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
|
||||
# If building in tree, we honor the same install suffix LLVM uses.
|
||||
- set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(OPENMP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
|
||||
if (NOT MSVC)
|
||||
set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 090cfa352078..624b7c9f3400 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -38,12 +38,26 @@ if(CLANG_BUILT_STANDALONE)
|
||||
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
|
||||
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
|
||||
|
||||
- # Turn into CACHE PATHs for overwritting
|
||||
- set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
|
||||
- set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
|
||||
- set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
|
||||
- set(LLVM_TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
|
||||
- set(LLVM_LIBRARY_DIR "${LLVM_LIBRARY_DIR}" CACHE PATH "Path to llvm/lib")
|
||||
+ # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
|
||||
+ # LLVM_CONFIG.
|
||||
+ if (NOT LLVM_CONFIG_FOUND)
|
||||
+ # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
|
||||
+ # path is removed.
|
||||
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
|
||||
+ set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
|
||||
+ # N.B. this is just a default value, the CACHE PATHs below can be overriden.
|
||||
+ set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
|
||||
+ set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
|
||||
+ set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
|
||||
+ else()
|
||||
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
|
||||
+ endif()
|
||||
+
|
||||
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
|
||||
+ set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
|
||||
+ set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
|
||||
+ set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
|
||||
+ set(LLVM_LIBRARY_DIR "${LIBRARY_DIR}" CACHE PATH "Path to llvm/lib")
|
||||
|
||||
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
|
||||
index 75b0080f6715..c895b884cd27 100644
|
||||
--- a/cmake/modules/AddClang.cmake
|
||||
+++ b/cmake/modules/AddClang.cmake
|
||||
@@ -119,8 +119,8 @@ macro(add_clang_library name)
|
||||
install(TARGETS ${lib}
|
||||
COMPONENT ${lib}
|
||||
${export_to_clangtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
|
||||
index bb9a11eabbef..e2de91c65fbb 100644
|
||||
--- a/lib/Headers/CMakeLists.txt
|
||||
+++ b/lib/Headers/CMakeLists.txt
|
||||
@@ -437,7 +437,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
|
||||
add_header_target("windows-resource-headers" ${windows_only_files})
|
||||
add_header_target("utility-resource-headers" ${utility_files})
|
||||
|
||||
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include)
|
||||
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include)
|
||||
|
||||
#############################################################
|
||||
# Install rules for the catch-all clang-resource-headers target
|
||||
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
|
||||
index 4f23065a2472..6a0f55991e24 100644
|
||||
--- a/tools/libclang/CMakeLists.txt
|
||||
+++ b/tools/libclang/CMakeLists.txt
|
||||
@@ -234,7 +234,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
|
||||
COMPONENT
|
||||
libclang-python-bindings
|
||||
DESTINATION
|
||||
- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
+ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
|
||||
endforeach()
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
add_custom_target(libclang-python-bindings)
|
||||
diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
|
||||
index 3aca22c0b0a8..3115353e3fe3 100644
|
||||
--- a/tools/scan-build-py/CMakeLists.txt
|
||||
+++ b/tools/scan-build-py/CMakeLists.txt
|
||||
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
|
||||
install(FILES lib/libscanbuild/${lib}
|
||||
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
|
||||
COMPONENT scan-build-py)
|
||||
endforeach()
|
||||
|
||||
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
|
||||
install(FILES lib/libscanbuild/resources/${resource}
|
||||
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
|
||||
COMPONENT scan-build-py)
|
||||
endforeach()
|
||||
|
||||
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
|
||||
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
|
||||
install(FILES lib/libear/${lib}
|
||||
- DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
|
||||
COMPONENT scan-build-py)
|
||||
endforeach()
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- a/lib/asan/CMakeLists.txt 2022-06-22 16:46:24.000000000 +0000
|
||||
+++ b/lib/asan/CMakeLists.txt
|
||||
@@ -46,7 +46,7 @@ set(ASAN_STATIC_SOURCES
|
||||
asan_rtl_static.cpp
|
||||
)
|
||||
|
||||
-if (NOT WIN32 AND NOT APPLE)
|
||||
+if (LINUX)
|
||||
list(APPEND ASAN_STATIC_SOURCES
|
||||
asan_rtl_x86_64.S
|
||||
)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
--- a/lib/builtins/fp_lib.h 1969-12-31 16:00:01.000000000 -0800
|
||||
+++ b/lib/builtins/fp_lib.h 2023-12-21 23:39:36.066927293 -0800
|
||||
@@ -26,18 +26,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-// x86_64 FreeBSD prior v9.3 define fixed-width types incorrectly in
|
||||
-// 32-bit mode.
|
||||
-#if defined(__FreeBSD__) && defined(__i386__)
|
||||
-#include <sys/param.h>
|
||||
-#if __FreeBSD_version < 903000 // v9.3
|
||||
-#define uint64_t unsigned long long
|
||||
-#define int64_t long long
|
||||
-#undef UINT64_C
|
||||
-#define UINT64_C(c) (c##ULL)
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
#if defined SINGLE_PRECISION
|
||||
|
||||
typedef uint16_t half_rep_t;
|
||||
|
|
@ -1,190 +0,0 @@
|
|||
From 93adcb770b99351b18553089c164fe3ef2119699 Mon Sep 17 00:00:00 2001
|
||||
From: Sam Clegg <sbc@chromium.org>
|
||||
Date: Fri, 25 Aug 2023 13:56:16 -0700
|
||||
Subject: [PATCH] [lld][WebAssembly] Add `--table-base` setting
|
||||
|
||||
This is similar to `--global-base` but determines where to place the
|
||||
table segments rather than that data segments.
|
||||
|
||||
See https://github.com/emscripten-core/emscripten/issues/20097
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D158892
|
||||
---
|
||||
test/wasm/table-base.s | 72 ++++++++++++++++++++++++++++++++++++++
|
||||
wasm/Driver.cpp | 19 ++++++++--
|
||||
wasm/Options.td | 5 ++-
|
||||
wasm/Writer.cpp | 8 -----
|
||||
4 files changed, 93 insertions(+), 11 deletions(-)
|
||||
create mode 100644 test/wasm/table-base.s
|
||||
|
||||
diff --git a/test/wasm/table-base.s b/test/wasm/table-base.s
|
||||
new file mode 100644
|
||||
index 000000000000000..56fff414fd31d96
|
||||
--- /dev/null
|
||||
+++ b/test/wasm/table-base.s
|
||||
@@ -0,0 +1,72 @@
|
||||
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
|
||||
+
|
||||
+# RUN: wasm-ld --export=__table_base -o %t.wasm %t.o
|
||||
+# RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=CHECK-DEFAULT
|
||||
+
|
||||
+# RUN: wasm-ld --table-base=100 --export=__table_base -o %t.wasm %t.o
|
||||
+# RUN: obj2yaml %t.wasm | FileCheck %s -check-prefix=CHECK-100
|
||||
+
|
||||
+.globl _start
|
||||
+_start:
|
||||
+ .functype _start () -> ()
|
||||
+ i32.const _start
|
||||
+ drop
|
||||
+ end_function
|
||||
+
|
||||
+# CHECK-DEFAULT: - Type: TABLE
|
||||
+# CHECK-DEFAULT-NEXT: Tables:
|
||||
+# CHECK-DEFAULT-NEXT: - Index: 0
|
||||
+# CHECK-DEFAULT-NEXT: ElemType: FUNCREF
|
||||
+# CHECK-DEFAULT-NEXT: Limits:
|
||||
+# CHECK-DEFAULT-NEXT: Flags: [ HAS_MAX ]
|
||||
+# CHECK-DEFAULT-NEXT: Minimum: 0x2
|
||||
+# CHECK-DEFAULT-NEXT: Maximum: 0x2
|
||||
+
|
||||
+# CHECK-DEFAULT: - Type: GLOBAL
|
||||
+# CHECK-DEFAULT-NEXT: Globals:
|
||||
+# CHECK-DEFAULT-NEXT: - Index: 0
|
||||
+# CHECK-DEFAULT-NEXT: Type: I32
|
||||
+# CHECK-DEFAULT-NEXT: Mutable: true
|
||||
+# CHECK-DEFAULT-NEXT: InitExpr:
|
||||
+# CHECK-DEFAULT-NEXT: Opcode: I32_CONST
|
||||
+# CHECK-DEFAULT-NEXT: Value: 66560
|
||||
+# CHECK-DEFAULT-NEXT: - Index: 1
|
||||
+# CHECK-DEFAULT-NEXT: Type: I32
|
||||
+# CHECK-DEFAULT-NEXT: Mutable: false
|
||||
+# CHECK-DEFAULT-NEXT: InitExpr:
|
||||
+# CHECK-DEFAULT-NEXT: Opcode: I32_CONST
|
||||
+# CHECK-DEFAULT-NEXT: Value: 1
|
||||
+
|
||||
+# CHECK-DEFAULT: - Type: EXPORT
|
||||
+# CHECK-DEFAULT: - Name: __table_base
|
||||
+# CHECK-DEFAULT-NEXT: Kind: GLOBAL
|
||||
+# CHECK-DEFAULT-NEXT: Index: 1
|
||||
+
|
||||
+# CHECK-100: - Type: TABLE
|
||||
+# CHECK-100-NEXT: Tables:
|
||||
+# CHECK-100-NEXT: - Index: 0
|
||||
+# CHECK-100-NEXT: ElemType: FUNCREF
|
||||
+# CHECK-100-NEXT: Limits:
|
||||
+# CHECK-100-NEXT: Flags: [ HAS_MAX ]
|
||||
+# CHECK-100-NEXT: Minimum: 0x65
|
||||
+# CHECK-100-NEXT: Maximum: 0x65
|
||||
+
|
||||
+# CHECK-100: - Type: GLOBAL
|
||||
+# CHECK-100-NEXT: Globals:
|
||||
+# CHECK-100-NEXT: - Index: 0
|
||||
+# CHECK-100-NEXT: Type: I32
|
||||
+# CHECK-100-NEXT: Mutable: true
|
||||
+# CHECK-100-NEXT: InitExpr:
|
||||
+# CHECK-100-NEXT: Opcode: I32_CONST
|
||||
+# CHECK-100-NEXT: Value: 66560
|
||||
+# CHECK-100-NEXT: - Index: 1
|
||||
+# CHECK-100-NEXT: Type: I32
|
||||
+# CHECK-100-NEXT: Mutable: false
|
||||
+# CHECK-100-NEXT: InitExpr:
|
||||
+# CHECK-100-NEXT: Opcode: I32_CONST
|
||||
+# CHECK-100-NEXT: Value: 100
|
||||
+
|
||||
+# CHECK-100: - Type: EXPORT
|
||||
+# CHECK-100: - Name: __table_base
|
||||
+# CHECK-100-NEXT: Kind: GLOBAL
|
||||
+# CHECK-100-NEXT: Index: 1
|
||||
diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
|
||||
index 84304881f5ca34e..c2f5f0185781f36 100644
|
||||
--- a/wasm/Driver.cpp
|
||||
+++ b/wasm/Driver.cpp
|
||||
@@ -502,6 +502,7 @@ static void readConfigs(opt::InputArgList &args) {
|
||||
|
||||
config->initialMemory = args::getInteger(args, OPT_initial_memory, 0);
|
||||
config->globalBase = args::getInteger(args, OPT_global_base, 0);
|
||||
+ config->tableBase = args::getInteger(args, OPT_table_base, 0);
|
||||
config->maxMemory = args::getInteger(args, OPT_max_memory, 0);
|
||||
config->zStackSize =
|
||||
args::getZOptionValue(args, OPT_z, "stack-size", WasmPageSize);
|
||||
@@ -573,6 +574,17 @@ static void setConfigs() {
|
||||
if (config->exportTable)
|
||||
error("-shared/-pie is incompatible with --export-table");
|
||||
config->importTable = true;
|
||||
+ } else {
|
||||
+ // Default table base. Defaults to 1, reserving 0 for the NULL function
|
||||
+ // pointer.
|
||||
+ if (!config->tableBase)
|
||||
+ config->tableBase = 1;
|
||||
+ // The default offset for static/global data, for when --global-base is
|
||||
+ // not specified on the command line. The precise value of 1024 is
|
||||
+ // somewhat arbitrary, and pre-dates wasm-ld (Its the value that
|
||||
+ // emscripten used prior to wasm-ld).
|
||||
+ if (!config->globalBase && !config->relocatable && !config->stackFirst)
|
||||
+ config->globalBase = 1024;
|
||||
}
|
||||
|
||||
if (config->relocatable) {
|
||||
@@ -666,8 +678,11 @@ static void checkOptions(opt::InputArgList &args) {
|
||||
warn("-Bsymbolic is only meaningful when combined with -shared");
|
||||
}
|
||||
|
||||
- if (config->globalBase && config->isPic) {
|
||||
- error("--global-base may not be used with -shared/-pie");
|
||||
+ if (config->isPic) {
|
||||
+ if (config->globalBase)
|
||||
+ error("--global-base may not be used with -shared/-pie");
|
||||
+ if (config->tableBase)
|
||||
+ error("--table-base may not be used with -shared/-pie");
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/wasm/Options.td b/wasm/Options.td
|
||||
index 50417d2928e0a34..bb764396bf4df14 100644
|
||||
--- a/wasm/Options.td
|
||||
+++ b/wasm/Options.td
|
||||
@@ -191,7 +191,7 @@ def growable_table: FF<"growable-table">,
|
||||
HelpText<"Remove maximum size from function table, allowing table to grow">;
|
||||
|
||||
def global_base: JJ<"global-base=">,
|
||||
- HelpText<"Where to start to place global data">;
|
||||
+ HelpText<"Memory offset at which to place global data (Defaults to 1024)">;
|
||||
|
||||
def import_memory: FF<"import-memory">,
|
||||
HelpText<"Import the module's memory from the default module of \"env\" with the name \"memory\".">;
|
||||
@@ -224,6 +224,9 @@ def no_entry: FF<"no-entry">,
|
||||
def stack_first: FF<"stack-first">,
|
||||
HelpText<"Place stack at start of linear memory rather than after data">;
|
||||
|
||||
+def table_base: JJ<"table-base=">,
|
||||
+ HelpText<"Table offset at which to place address taken functions (Defaults to 1)">;
|
||||
+
|
||||
defm whole_archive: B<"whole-archive",
|
||||
"Force load of all members in a static library",
|
||||
"Do not force load of all members in a static library (default)">;
|
||||
diff --git a/wasm/Writer.cpp b/wasm/Writer.cpp
|
||||
index f25d358dc5bae6f..0576bf2907e49c4 100644
|
||||
--- a/wasm/Writer.cpp
|
||||
+++ b/wasm/Writer.cpp
|
||||
@@ -358,13 +358,6 @@ void Writer::layoutMemory() {
|
||||
memoryPtr = config->globalBase;
|
||||
}
|
||||
} else {
|
||||
- if (!config->globalBase && !config->relocatable && !config->isPic) {
|
||||
- // The default offset for static/global data, for when --global-base is
|
||||
- // not specified on the command line. The precise value of 1024 is
|
||||
- // somewhat arbitrary, and pre-dates wasm-ld (Its the value that
|
||||
- // emscripten used prior to wasm-ld).
|
||||
- config->globalBase = 1024;
|
||||
- }
|
||||
memoryPtr = config->globalBase;
|
||||
}
|
||||
|
||||
@@ -1685,7 +1678,6 @@ void Writer::run() {
|
||||
// For PIC code the table base is assigned dynamically by the loader.
|
||||
// For non-PIC, we start at 1 so that accessing table index 0 always traps.
|
||||
if (!config->isPic) {
|
||||
- config->tableBase = 1;
|
||||
if (WasmSym::definedTableBase)
|
||||
WasmSym::definedTableBase->setVA(config->tableBase);
|
||||
if (WasmSym::definedTableBase32)
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3d6225646fe6..9b5d0b15af13 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -33,10 +33,22 @@ if(LLD_BUILT_STANDALONE)
|
||||
find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}")
|
||||
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}")
|
||||
|
||||
- # Turn into CACHE PATHs for overwriting
|
||||
- set(LLVM_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
|
||||
- set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}" CACHE PATH "Path to LLVM build tree")
|
||||
- set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
|
||||
+ # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets
|
||||
+ # LLVM_CONFIG.
|
||||
+ if (NOT LLVM_CONFIG_FOUND)
|
||||
+ # Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
|
||||
+ # path is removed.
|
||||
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
|
||||
+ set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
|
||||
+ # N.B. this is just a default value, the CACHE PATHs below can be overridden.
|
||||
+ set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
|
||||
+ else()
|
||||
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
|
||||
+ endif()
|
||||
+
|
||||
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
|
||||
+ set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
|
||||
+ set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
|
||||
|
||||
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
|
||||
index d3924f7243d4..42a7cd62281c 100644
|
||||
--- a/cmake/modules/AddLLD.cmake
|
||||
+++ b/cmake/modules/AddLLD.cmake
|
||||
@@ -18,8 +18,8 @@ macro(add_lld_library name)
|
||||
install(TARGETS ${name}
|
||||
COMPONENT ${name}
|
||||
${export_to_lldtargets}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
|
||||
index ec06ba285f27..286162f098fb 100644
|
||||
--- a/cmake/modules/LLDBConfig.cmake
|
||||
+++ b/cmake/modules/LLDBConfig.cmake
|
||||
@@ -290,7 +290,8 @@ if (NOT TARGET clang-resource-headers)
|
||||
# could be and pick the first that exists.
|
||||
foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
|
||||
"${LLVM_BUILD_LIBRARY_DIR}"
|
||||
- "${LLVM_LIBRARY_DIR}")
|
||||
+ "${LLVM_LIBRARY_DIR}"
|
||||
+ "@clangLibDir@")
|
||||
# Build the resource directory path by appending 'clang/<version number>'.
|
||||
set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
|
||||
if (IS_DIRECTORY "${CANDIDATE_RESOURCE_DIR}")
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7e25e0407db2..72f031a82b75 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -995,7 +995,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
|
||||
add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
|
||||
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
|
||||
install(TARGETS tf_xla_runtime EXPORT LLVMExports
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
|
||||
# Once we add more modules, we should handle this more automatically.
|
||||
if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index 93e6d67551de..8d367457af5a 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -874,8 +874,8 @@ macro(add_llvm_library name)
|
||||
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
|
||||
install(TARGETS ${name}
|
||||
${export_to_llvmexports}
|
||||
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
|
||||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT ${name}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
@@ -2043,7 +2043,7 @@ function(llvm_install_library_symlink name dest type)
|
||||
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
|
||||
|
||||
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
|
||||
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
|
||||
if(WIN32 AND "${type}" STREQUAL "SHARED")
|
||||
set(output_dir "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
@@ -2312,16 +2312,37 @@ function(llvm_setup_rpath name)
|
||||
|
||||
if (APPLE)
|
||||
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
|
||||
- set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
|
||||
# $ORIGIN is not interpreted at link time by aix ld.
|
||||
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
|
||||
# hardcode the rpath to build/install lib dir first in this mode.
|
||||
# FIXME: update this when there is better solution.
|
||||
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
elseif(UNIX)
|
||||
- set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ # Note that we add `extra_libdir` (aka `LLVM_LIBRARY_DIR` in our case) back
|
||||
+ # to `_install_rpath` here.
|
||||
+ #
|
||||
+ # In nixpkgs we do not build and install LLVM alongside rdeps of LLVM (i.e.
|
||||
+ # clang); instead LLVM is its own package and thus lands at its own nix
|
||||
+ # store path. This makes it so that the default relative rpath (`../lib/`)
|
||||
+ # does not point at the LLVM shared objects.
|
||||
+ #
|
||||
+ # More discussion here:
|
||||
+ # - https://github.com/NixOS/nixpkgs/pull/235624#discussion_r1220150329
|
||||
+ # - https://reviews.llvm.org/D146918 (16.0.5+)
|
||||
+ #
|
||||
+ # Note that we leave `extra_libdir` in `_build_rpath`: without FHS there is
|
||||
+ # no potential that this will result in us pulling in the "wrong" LLVM.
|
||||
+ # Adding this to the build rpath means we aren't forced to use
|
||||
+ # `installCheckPhase` instead of `checkPhase` (i.e. binaries in the build
|
||||
+ # dir, pre-install, will have the right rpath for LLVM).
|
||||
+ #
|
||||
+ # As noted in the differential above, an alternative solution is to have
|
||||
+ # all rdeps of nixpkgs' LLVM (that use the AddLLVM.cmake machinery) set
|
||||
+ # `CMAKE_INSTALL_RPATH`.
|
||||
+ set(_build_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
|
||||
set_property(TARGET ${name} APPEND_STRING PROPERTY
|
||||
LINK_FLAGS " -Wl,-z,origin ")
|
||||
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
|
||||
index 891c9e6d618c..8d963f3b0069 100644
|
||||
--- a/cmake/modules/AddOCaml.cmake
|
||||
+++ b/cmake/modules/AddOCaml.cmake
|
||||
@@ -147,9 +147,9 @@ function(add_ocaml_library name)
|
||||
endforeach()
|
||||
|
||||
if( APPLE )
|
||||
- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
|
||||
index d99af79aa38e..21e794224b99 100644
|
||||
--- a/cmake/modules/CMakeLists.txt
|
||||
+++ b/cmake/modules/CMakeLists.txt
|
||||
@@ -127,7 +127,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
|
||||
)
|
||||
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
|
||||
|
||||
-extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "lib\${LLVM_LIBDIR_SUFFIX}")
|
||||
+extend_path(LLVM_CONFIG_LIBRARY_DIR "\${LLVM_INSTALL_PREFIX}" "${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
|
||||
set(LLVM_CONFIG_LIBRARY_DIRS
|
||||
"${LLVM_CONFIG_LIBRARY_DIR}"
|
||||
# FIXME: Should there be other entries here?
|
||||
diff --git a/docs/CMake.rst b/docs/CMake.rst
|
||||
index 7926de258ec8..5ae01adc3905 100644
|
||||
--- a/docs/CMake.rst
|
||||
+++ b/docs/CMake.rst
|
||||
@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
|
||||
**LLVM_LIBDIR_SUFFIX**:STRING
|
||||
Extra suffix to append to the directory where libraries are to be
|
||||
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
|
||||
- to install libraries to ``/usr/lib64``.
|
||||
+ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
|
||||
|
||||
**LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
|
||||
Building the llvm toolchain can use a lot of resources, particularly
|
||||
@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
|
||||
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
|
||||
Defaults to "bin".
|
||||
|
||||
+**CMAKE_INSTALL_LIBDIR**:PATH
|
||||
+ The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
|
||||
+ Defaults to "lib".
|
||||
+
|
||||
**CMAKE_INSTALL_INCLUDEDIR**:PATH
|
||||
The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
|
||||
Defaults to "include".
|
||||
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
|
||||
index 370005cd8d7d..7e790bc52111 100644
|
||||
--- a/tools/llvm-config/BuildVariables.inc.in
|
||||
+++ b/tools/llvm-config/BuildVariables.inc.in
|
||||
@@ -23,6 +23,7 @@
|
||||
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
|
||||
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
|
||||
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
|
||||
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
|
||||
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
#define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
|
||||
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
|
||||
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
||||
index b1d795a0a349..de6cb1514f05 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -366,7 +366,11 @@ int main(int argc, char **argv) {
|
||||
sys::fs::make_absolute(ActivePrefix, Path);
|
||||
ActiveBinDir = std::string(Path.str());
|
||||
}
|
||||
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
|
||||
+ {
|
||||
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
|
||||
+ sys::fs::make_absolute(ActivePrefix, Path);
|
||||
+ ActiveLibDir = std::string(Path.str());
|
||||
+ }
|
||||
{
|
||||
SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
|
||||
sys::fs::make_absolute(ActivePrefix, Path);
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
|
||||
index 0242e0b75af3..d732011306f7 100644
|
||||
--- a/utils/lit/lit/TestRunner.py
|
||||
+++ b/utils/lit/lit/TestRunner.py
|
||||
@@ -1029,6 +1029,12 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
|
||||
f.write('@echo off\n')
|
||||
f.write('\n@if %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
|
||||
else:
|
||||
+ # This env var is *purged* when invoking subprocesses so we have to
|
||||
+ # manually set it from within the bash script in order for the commands
|
||||
+ # in run lines to see this var:
|
||||
+ if "DYLD_LIBRARY_PATH" in test.config.environment:
|
||||
+ f.write(f'export DYLD_LIBRARY_PATH="{test.config.environment["DYLD_LIBRARY_PATH"]}"\n')
|
||||
+
|
||||
for i, ln in enumerate(commands):
|
||||
match = re.match(kPdbgRegex, ln)
|
||||
if match:
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue