Skip to content

Sonoma merge #808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 18 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
include_directories(BEFORE SYSTEM ${DISPATCH_INCLUDES})
dispatch_windows_lib_for_arch(${CMAKE_SYSTEM_PROCESSOR} DISPATCH_LIBDIR)
link_directories(${DISPATCH_LIBDIR})

include(CheckCSourceCompiles)
check_c_source_compiles([=[
#include <Windows.h>
int main(int argc, char *argv[]) {
switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
case RelationProcessorDie:
case RelationNumaNodeEx:
return 0;
}
return 0;
}
]=] DISPATCH_HAVE_EXTENDED_SLPI_20348)
if(DISPATCH_HAVE_EXTENDED_SLPI_20348)
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_20348)
endif()

check_c_source_compiles([=[
#include <Windows.h>
int main(int argc, char *argv[]) {
switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
case RelationProcessorModule:
return 0;
}
return 0;
}
]=] DISPATCH_HAVE_EXTENDED_SLPI_22000)
if(DISPATCH_HAVE_EXTENDED_SLPI_22000)
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_22000)
endif()
endif()

set(CMAKE_C_STANDARD 11)
Expand Down Expand Up @@ -261,12 +231,26 @@ endif()


if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fmodule-map-file=${PROJECT_SOURCE_DIR}/dispatch/darwin/module.modulemap>
$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fmodule-map-file=${PROJECT_SOURCE_DIR}/private/darwin/module.modulemap>)
add_custom_command(OUTPUT
"${PROJECT_SOURCE_DIR}/dispatch/module.modulemap"
"${PROJECT_SOURCE_DIR}/private/module.modulemap"
COMMAND
${CMAKE_COMMAND} -E copy_if_different "${PROJECT_SOURCE_DIR}/dispatch/darwin/module.modulemap" "${PROJECT_SOURCE_DIR}/dispatch/module.modulemap"
COMMAND
${CMAKE_COMMAND} -E copy_if_different "${PROJECT_SOURCE_DIR}/private/darwin/module.modulemap" "${PROJECT_SOURCE_DIR}/private/module.modulemap")
else()
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fmodule-map-file=${PROJECT_SOURCE_DIR}/dispatch/generic/module.modulemap>
$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fmodule-map-file=${PROJECT_SOURCE_DIR}/private/generic/module.modulemap>)
add_custom_command(OUTPUT
"${PROJECT_SOURCE_DIR}/dispatch/module.modulemap"
"${PROJECT_SOURCE_DIR}/private/module.modulemap"
COMMAND
${CMAKE_COMMAND} -E copy_if_different "${PROJECT_SOURCE_DIR}/dispatch/generic/module.modulemap" "${PROJECT_SOURCE_DIR}/dispatch/module.modulemap"
COMMAND
${CMAKE_COMMAND} -E copy_if_different "${PROJECT_SOURCE_DIR}/private/generic/module.modulemap" "${PROJECT_SOURCE_DIR}/private/module.modulemap")
endif()
add_custom_target(module-maps ALL
DEPENDS
"${PROJECT_SOURCE_DIR}/dispatch/module.modulemap"
"${PROJECT_SOURCE_DIR}/private/module.modulemap")

configure_file("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
"${PROJECT_BINARY_DIR}/config/config_ac.h")
Expand Down
52 changes: 21 additions & 31 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.
1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
Expand Down Expand Up @@ -63,14 +63,14 @@
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
Expand All @@ -86,7 +86,7 @@
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
Expand Down Expand Up @@ -127,20 +127,20 @@
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
Expand All @@ -150,7 +150,7 @@
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
Expand All @@ -162,7 +162,7 @@
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
Expand All @@ -173,9 +173,9 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
Expand All @@ -186,26 +186,16 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



### Runtime Library Exception to the Apache 2.0 License: ###


As an exception, if you use this Software to compile your source code and
portions of this Software are embedded into the binary product as a result,
you may redistribute such product without providing attribution as would
otherwise be required by Sections 4(a), 4(b) and 4(d) of the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
110 changes: 110 additions & 0 deletions PATCHES
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,113 @@ github commits starting with 29bdc2f from
[3975b58] APPLIED rdar://44568645
[81dc900] APPLIED rdar://44568645
[6162a1d] APPLIED rdar://44568645
[c55ff6f] APPLIED rdar://54572081
[c4a7149] APPLIED rdar://54572081
[edce1fe] APPLIED rdar://54572081
[ac525a4] APPLIED rdar://54572081
[0710b29] APPLIED rdar://54572081
[e99de71] APPLIED rdar://54572081
[6d83ad5] APPLIED rdar://54572081
[3ed78b5] APPLIED rdar://54572081
[f6376cb] APPLIED rdar://54572081
[9acbab3] APPLIED rdar://54572081
[ca08b5f] APPLIED rdar://54572081
[775f9f2] APPLIED rdar://54572081
[db37bbc] APPLIED rdar://54572081
[9852dcb] APPLIED rdar://54572081
[9ec95bf] APPLIED rdar://54572081
[bd2367c] APPLIED rdar://54572081
[a736ea7] APPLIED rdar://54572081
[3e4ea66] APPLIED rdar://54572081
[c85c0d8] APPLIED rdar://54572081
[7187ea2] APPLIED rdar://54572081
[30eeb14] APPLIED rdar://54572081
[6a5c6d8] APPLIED rdar://54572081
[64a12c6] APPLIED rdar://54572081
[09ec354] APPLIED rdar://54572081
[5bcd598] APPLIED rdar://54572081
[7874a92] APPLIED rdar://54572081
[619775e] APPLIED rdar://54572081
[e3ae79b] APPLIED rdar://54572081
[fb368f6] APPLIED rdar://54572081
[afa6cc3] APPLIED rdar://54572081
[e6df818] APPLIED rdar://54572081
[7144ee3] APPLIED rdar://54572081
[60ffcc2] APPLIED rdar://54572081
[618b070] APPLIED rdar://54572081
[dde5892] APPLIED rdar://54572081
[81c9bf6] APPLIED rdar://54572081
[4b85ca6] APPLIED rdar://54572081
[ff3bf51] APPLIED rdar://54572081
[bc00e13] APPLIED rdar://54572081
[d44acc0] APPLIED rdar://54572081
[4659503] APPLIED rdar://54572081
[60fdf80] APPLIED rdar://54572081
[7a74af4] APPLIED rdar://54572081
[f20349f] APPLIED rdar://54572081
[ef9364c] APPLIED rdar://54572081
[9d485ca] APPLIED rdar://54572081
[cbd70d1] APPLIED rdar://54572081
[6e1825a] APPLIED rdar://54572081
[319bd33] APPLIED rdar://54572081
[6c5b3ba] APPLIED rdar://54572081
[7e7677b] APPLIED rdar://54572081
[9002f70] APPLIED rdar://54572081
[cc04868] APPLIED rdar://54572081
[dc0dd64] APPLIED rdar://54572081
[a5f5a92] APPLIED rdar://54572081
[e5ba042] APPLIED rdar://54572081
[a3bff44] APPLIED rdar://54572081
[2e3d5c0] APPLIED rdar://54572081
[1482ec9] APPLIED rdar://54572081
[6bf6cb1] APPLIED rdar://54572081
[aa13cad] APPLIED rdar://54572081
[b073d89] APPLIED rdar://54572081
[7784917] APPLIED rdar://54572081
[717b3f7] APPLIED rdar://54572081
[37010f0] APPLIED rdar://54572081
[251dba4] APPLIED rdar://54572081
[a18aa1f] APPLIED rdar://54572081
[e8d020e] APPLIED rdar://54572081
[90a84a1] APPLIED rdar://54572081
[7721660] APPLIED rdar://54572081
[c5af10f] APPLIED rdar://54572081
[f01432d] APPLIED rdar://54572081
[d0394bf] APPLIED rdar://54572081
[2b14a98] APPLIED rdar://54572081
[d32596b] APPLIED rdar://54572081
[52bc6b2] APPLIED rdar://54572081
[4169c8d] APPLIED rdar://54572081
[318f6e5] APPLIED rdar://54572081
[6a36af8] APPLIED rdar://54572081
[d11d565] APPLIED rdar://54572081
[d9740c2] APPLIED rdar://54572081
[fc917b4] APPLIED rdar://54572081
[f911a44] APPLIED rdar://54572081
[6d32c4d] APPLIED rdar://54572081
[9005cb4] APPLIED rdar://54572081
[68875cb] APPLIED rdar://54572081
[fc73866] APPLIED rdar://54572081
[3cf1bf3] APPLIED rdar://54572081
[3da29dd] APPLIED rdar://81276248
[90a45ce] APPLIED rdar://81276248
[37c8c28] APPLIED rdar://81276248
[c023edd] APPLIED rdar://81276248
[ab8a151] APPLIED rdar://81276248
[c66cb25] APPLIED rdar://81276248
[289e552] APPLIED rdar://81276248
[afd6b6d] APPLIED rdar://81276248
[4c91d20] APPLIED rdar://81276248
[2accb0b] APPLIED rdar://81276248
[b0b314c] APPLIED rdar://81276248
[c992dac] APPLIED rdar://81276248
[80b1772] APPLIED rdar://81276248
[1986f39] APPLIED rdar://81276248
[598ce42] APPLIED rdar://81276248
[feb4421] APPLIED rdar://81276248
[f152471] APPLIED rdar://81276248
[457b110] APPLIED rdar://81276248
[f13ea5d] APPLIED rdar://81276248
[1c303fa] APPLIED rdar://81276248
[34f383d] APPLIED rdar://81276248
[7870521] APPLIED rdar://81276248
8 changes: 2 additions & 6 deletions cmake/modules/SwiftSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
function(get_swift_host_arch result_var_name)
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
set("${result_var_name}" "x86_64" PARENT_SCOPE)
elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AArch64|aarch64|arm64")
if(CMAKE_SYSTEM_NAME MATCHES Darwin)
set("${result_var_name}" "arm64" PARENT_SCOPE)
else()
set("${result_var_name}" "aarch64" PARENT_SCOPE)
endif()
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set("${result_var_name}" "aarch64" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")
set("${result_var_name}" "powerpc64" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le")
Expand Down
16 changes: 13 additions & 3 deletions config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* Define to 1 if you have the declaration of `CLOCK_REALTIME', and to 0 if
you don't. */
#define CLOCK_REALTIME 0
#define HAVE_DECL_CLOCK_REALTIME 0

/* Define to 1 if you have the declaration of `CLOCK_UPTIME', and to 0 if you
don't. */
Expand Down Expand Up @@ -61,6 +61,10 @@
you don't. */
#define HAVE_DECL_VQ_VERYLOWDISK 1

/* Define to 1 if you have the declaration of `VQ_SERVEREVENT', and to 0 if
you don't. */
#define HAVE_DECL_VQ_SERVEREVENT 1

/* Define to 1 if you have the declaration of `VQ_QUOTA', and to 0 if
you don't. */
#define HAVE_DECL_VQ_QUOTA 1
Expand All @@ -73,8 +77,8 @@
you don't. */
#define HAVE_DECL_VQ_DESIRED_DISK 1

/* Define to 1 if you have the declaration of `VQ_FREE_SPACE_CHANGE', and to 0 if
you don't. */
/* Define to 1 if you have the declaration of `VQ_FREE_SPACE_CHANGE`, and to 0
* if you don't */
#define HAVE_DECL_VQ_FREE_SPACE_CHANGE 1

/* Define to 1 if you have the <dlfcn.h> header file. */
Expand Down Expand Up @@ -125,6 +129,12 @@
/* Define if you have the Objective-C runtime */
#define HAVE_OBJC 1

/* Define to 1 if you have the `posix_fadvise' function. */
#define HAVE_POSIX_FADVISE 0

/* Define to 1 if you have the `posix_spawnp' function. */
#define HAVE_POSIX_SPAWNP 1

/* Define to 1 if you have the `pthread_key_init_np' function. */
#define HAVE_PTHREAD_KEY_INIT_NP 1

Expand Down
13 changes: 12 additions & 1 deletion dispatch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,19 @@ install(FILES
DESTINATION
"${INSTALL_DISPATCH_HEADERS_DIR}")
if(ENABLE_SWIFT)
set(base_dir "${CMAKE_CURRENT_SOURCE_DIR}")
if(NOT BUILD_SHARED_LIBS)
set(base_dir "${CMAKE_CURRENT_SOURCE_DIR}/generic_static")
endif()

get_filename_component(
MODULE_MAP
module.modulemap
REALPATH
BASE_DIR "${base_dir}")

install(FILES
${DISPATCH_MODULE_MAP}
${MODULE_MAP}
DESTINATION
"${INSTALL_DISPATCH_HEADERS_DIR}")
endif()
Expand Down
2 changes: 2 additions & 0 deletions dispatch/Dispatch.apinotes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
Name: Dispatch
Loading