Skip to content

Commit e80e7e3

Browse files
authored
Merge pull request #62234 from apple/maxd/cmark-build-cleanup
build-script-impl: remove CMark cases as unused CMark was converted from a `build-script-impl` product to `build-script` product in #37102. After that change, some of the remaining mentions of CMark in `build-script-impl` were unused and can be removed.
2 parents 2f5528c + 998856d commit e80e7e3

File tree

2 files changed

+0
-69
lines changed

2 files changed

+0
-69
lines changed

utils/build-script-impl

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ KNOWN_SETTINGS=(
266266
)
267267

268268
components=(
269-
cmark
270269
foundation
271270
libcxx
272271
libdispatch
@@ -284,9 +283,6 @@ components=(
284283
)
285284
for component in ${components[@]} ; do
286285
component_skip_test_default=""
287-
if [[ "${component}" == "cmark" ]]; then
288-
component_skip_test_default="1"
289-
fi
290286
KNOWN_SETTINGS+=(
291287
${component}-build-type "Debug" "the build variant for ${component}"
292288
${component}-cmake-options "" "CMake options used for ${component}"
@@ -494,7 +490,6 @@ function verify_host_is_supported() {
494490
function set_build_options_for_host() {
495491
llvm_cmake_options=()
496492
swift_cmake_options=()
497-
cmark_cmake_options=()
498493
lldb_cmake_options=()
499494
llbuild_cmake_options=()
500495
SWIFT_HOST_VARIANT=
@@ -613,11 +608,6 @@ function set_build_options_for_host() {
613608
SWIFT_HOST_VARIANT_ARCH="arm64"
614609

615610
cmake_osx_deployment_target=""
616-
cmark_cmake_options=(
617-
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
618-
-DCMAKE_CXX_FLAGS="$(cmark_c_flags ${host})"
619-
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
620-
)
621611
;;
622612
iphoneos-arm64)
623613
SWIFT_HOST_TRIPLE="arm64-apple-ios${DARWIN_DEPLOYMENT_VERSION_IOS}"
@@ -649,11 +639,6 @@ function set_build_options_for_host() {
649639
SWIFT_HOST_VARIANT_ARCH="arm64"
650640

651641
cmake_osx_deployment_target=""
652-
cmark_cmake_options=(
653-
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
654-
-DCMAKE_CXX_FLAGS="$(cmark_c_flags ${host})"
655-
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
656-
)
657642
;;
658643
appletvos-arm64)
659644
SWIFT_HOST_TRIPLE="arm64-apple-tvos${DARWIN_DEPLOYMENT_VERSION_TVOS}"
@@ -685,11 +670,6 @@ function set_build_options_for_host() {
685670
SWIFT_HOST_VARIANT_ARCH="arm64"
686671

687672
cmake_osx_deployment_target=""
688-
cmark_cmake_options=(
689-
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
690-
-DCMAKE_CXX_FLAGS="$(cmark_c_flags ${host})"
691-
-DCMAKE_OSX_SYSROOT:PATH="$(xcrun --sdk ${xcrun_sdk_name} --show-sdk-path)"
692-
)
693673
;;
694674
watchos-armv7k)
695675
SWIFT_HOST_TRIPLE="armv7k-apple-watchos${DARWIN_DEPLOYMENT_VERSION_WATCHOS}"
@@ -725,13 +705,6 @@ function set_build_options_for_host() {
725705

726706
cmake_os_sysroot="$(xcrun --sdk ${platform} --show-sdk-path)"
727707

728-
cmark_cmake_options=(
729-
-DCMAKE_C_FLAGS="$(cmark_c_flags ${host})"
730-
-DCMAKE_CXX_FLAGS="$(cmark_c_flags ${host})"
731-
-DCMAKE_OSX_SYSROOT:PATH="${cmake_os_sysroot}"
732-
-DCMAKE_OSX_DEPLOYMENT_TARGET="${cmake_osx_deployment_target}"
733-
-DCMAKE_OSX_ARCHITECTURES="${architecture}"
734-
)
735708
llvm_cmake_options=(
736709
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="${cmake_osx_deployment_target}"
737710
-DCMAKE_OSX_SYSROOT:PATH="${cmake_os_sysroot}"
@@ -1233,7 +1206,6 @@ SWIFT_SYNTAX_SOURCE_DIR="${WORKSPACE}/swift-syntax"
12331206
# like tblgen that Swift relies on for building and testing. See the LLVM
12341207
# configure rules.
12351208
PRODUCTS=(llvm)
1236-
[[ "${SKIP_BUILD_CMARK}" ]] || PRODUCTS+=(cmark)
12371209
[[ "${SKIP_BUILD_LIBCXX}" ]] || PRODUCTS+=(libcxx)
12381210
[[ "${SKIP_BUILD_LIBICU}" ]] || PRODUCTS+=(libicu)
12391211
[[ "${SKIP_BUILD_SWIFT}" ]] || PRODUCTS+=(swift)
@@ -1298,9 +1270,6 @@ function build_directory_bin() {
12981270
root="$(build_directory ${host} ${product})"
12991271
if [[ "${CMAKE_GENERATOR}" == "Xcode" ]] ; then
13001272
case ${product} in
1301-
cmark)
1302-
echo "${root}/${CMARK_BUILD_TYPE}/bin"
1303-
;;
13041273
llvm)
13051274
echo "${root}/${LLVM_BUILD_TYPE}/bin"
13061275
;;
@@ -1396,10 +1365,6 @@ function llvm_c_flags() {
13961365
fi
13971366
}
13981367

1399-
function cmark_c_flags() {
1400-
echo -n " $(common_cross_c_flags $1 ${CMARK_BUILD_TYPE})"
1401-
}
1402-
14031368
function swift_c_flags() {
14041369
# Don't pass common_cross_c_flags to Swift because CMake code in the Swift
14051370
# project is itself aware of cross-compilation for the host tools and
@@ -1424,9 +1389,6 @@ function cmake_config_opt() {
14241389
# CMake automatically adds --target ALL_BUILD if we don't pass this.
14251390
echo "--target ZERO_CHECK "
14261391
case ${product} in
1427-
cmark)
1428-
echo "--config ${CMARK_BUILD_TYPE}"
1429-
;;
14301392
llvm)
14311393
echo "--config ${LLVM_BUILD_TYPE}"
14321394
;;
@@ -1725,18 +1687,6 @@ for host in "${ALL_HOSTS[@]}"; do
17251687
cmake_options+=("${product_cmake_options[@]}")
17261688

17271689
case ${product} in
1728-
cmark)
1729-
cmake_options=(
1730-
"${cmake_options[@]}"
1731-
-DCMAKE_BUILD_TYPE:STRING="${CMARK_BUILD_TYPE}"
1732-
"${cmark_cmake_options[@]}"
1733-
)
1734-
if [[ $(is_cross_tools_host ${host}) ]] ; then
1735-
cmake_options+=("${SWIFT_TARGET_CMAKE_OPTIONS[@]}")
1736-
fi
1737-
build_targets=(all)
1738-
;;
1739-
17401690
llvm)
17411691
if [[ -n "${LLVM_NINJA_TARGETS_FOR_CROSS_COMPILE_HOSTS}" && $(is_cross_tools_host ${host}) ]] ; then
17421692
build_targets=("${LLVM_NINJA_TARGETS_FOR_CROSS_COMPILE_HOSTS[@]}")
@@ -2893,17 +2843,6 @@ for host in "${ALL_HOSTS[@]}"; do
28932843
fi
28942844

28952845
case ${product} in
2896-
cmark)
2897-
if [[ "${SKIP_TEST_CMARK}" ]]; then
2898-
continue
2899-
fi
2900-
executable_target=api_test
2901-
results_targets=(test)
2902-
if [[ "${CMAKE_GENERATOR}" == "Xcode" ]]; then
2903-
# Xcode generator uses "RUN_TESTS" instead of "test".
2904-
results_targets=(RUN_TESTS)
2905-
fi
2906-
;;
29072846
llvm)
29082847
continue # We don't test LLVM
29092848
;;
@@ -3229,11 +3168,6 @@ for host in "${ALL_HOSTS[@]}"; do
32293168
INSTALL_TARGETS="install"
32303169

32313170
case ${product} in
3232-
cmark)
3233-
if [[ -z "${INSTALL_CMARK}" ]] ; then
3234-
continue
3235-
fi
3236-
;;
32373171
llvm)
32383172
if [[ -z "${INSTALL_LLVM}" ]] ; then
32393173
continue

utils/swift_build_support/swift_build_support/build_script_invocation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def convert_to_impl_arguments(self):
104104
"--darwin-deployment-version-watchos=%s" % (
105105
args.darwin_deployment_version_watchos),
106106
"--cmake", toolchain.cmake,
107-
"--cmark-build-type", args.cmark_build_variant,
108107
"--llvm-build-type", args.llvm_build_variant,
109108
"--swift-build-type", args.swift_build_variant,
110109
"--swift-stdlib-build-type", args.swift_stdlib_build_variant,
@@ -256,7 +255,6 @@ def convert_to_impl_arguments(self):
256255
# if we are going to build them and install_all is set, we also install
257256
# them.
258257
conditional_subproject_configs = [
259-
(args.build_cmark, "cmark"),
260258
(args.build_llvm, "llvm"),
261259
(args.build_swift, "swift"),
262260
(args.build_foundation, "foundation"),
@@ -296,7 +294,6 @@ def convert_to_impl_arguments(self):
296294
impl_args += ["--skip-test-swift"]
297295
if not args.test:
298296
impl_args += [
299-
"--skip-test-cmark",
300297
"--skip-test-lldb",
301298
"--skip-test-llbuild",
302299
"--skip-test-xctest",

0 commit comments

Comments
 (0)