nixpkgs/pkgs/development/compilers/llvm/8/clang/xpc.patch
Andrew Childs 7869d16545 llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.

The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.

Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.

----

Other misc notes, highly incomplete

- lvm-config-native and llvm-config are put in `dev` because they are
  tools just for build time.

- Clang no longer has an lld dep. That was introduced in
  db29857eb3, but if clang needs help
  finding lld when it is used we should just pass it flags / put in the
  resource dir. Providing it at build time increases critical path
  length for no good reason.

----

A note on `nativeCC`:

`stdenv` takes tools from the previous stage, so:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`

while:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2021-04-30 05:41:00 +00:00

41 lines
1.4 KiB
Diff

From 61c9b97d7b81cc2c013b423bf1763a92b14fcae3 Mon Sep 17 00:00:00 2001
From: Jan Korous <jkorous@apple.com>
Date: Tue, 26 Mar 2019 03:48:25 +0000
Subject: [PATCH] [clangd][xpc][cmake] Respect explicit value of
CLANGD_BUILD_XPC
We shouldn't prevent user from disabling XPC framework build on Darwin.
However, by keeping it on by default our CI systems also test
it by default on macOS.
Based on user request:
http://lists.llvm.org/pipermail/cfe-dev/2019-March/061778.html
Differential Revision: https://reviews.llvm.org/D59808
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@356974 91177308-0d34-0410-b5e6-96231b3b80d8
---
CMakeLists.txt | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66ebeaeeaa..514b17fb3c 100644
--- a/tools/extra/CMakeLists.txt
+++ b/tools/extra/CMakeLists.txt
@@ -1,6 +1,13 @@
-option(CLANGD_BUILD_XPC "Build XPC Support For Clangd." OFF)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set(CLANGD_BUILD_XPC ON CACHE BOOL "" FORCE)
+if (NOT DEFINED CLANGD_BUILD_XPC)
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(CLANGD_BUILD_XPC_DEFAULT ON)
+ else ()
+ set(CLANGD_BUILD_XPC_DEFAULT OFF)
+ endif ()
+
+ set(CLANGD_BUILD_XPC ${CLANGD_BUILD_XPC_DEFAULT} CACHE BOOL "Build XPC Support For Clangd." FORCE)
+
+ unset(CLANGD_BUILD_XPC_DEFAULT)
endif ()
add_subdirectory(clang-apply-replacements)