Skip to content

Commit da5e2e6

Browse files
authored
Merge pull request swiftlang#22375 from apple/revert-22359-revert-22346-libcxx
Reapply "[build-script] Add Product for libc++"
2 parents 6ab6954 + 1b2677f commit da5e2e6

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

utils/build-presets.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ install-libicu
730730
install-prefix=/usr
731731
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;parser-lib;license;sourcekit-inproc
732732
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt;clangd
733+
install-libcxx
733734
build-swift-static-stdlib
734735
build-swift-static-sdk-overlay
735736
build-swift-stdlib-unittest-extra
@@ -1082,6 +1083,7 @@ reconfigure
10821083

10831084
swift-install-components=compiler;clang-resource-dir-symlink;stdlib;sdk-overlay;parser-lib;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers
10841085
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt;clangd
1086+
install-libcxx
10851087

10861088
# Path to the .tar.gz package we would create.
10871089
installable-package=%(installable_package)s

utils/build-script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ class BuildScriptInvocation(object):
841841
product_classes = []
842842
product_classes.append(products.CMark)
843843
product_classes.append(products.LLVM)
844+
product_classes.append(products.LibCXX)
844845
if self.args.build_libicu:
845846
product_classes.append(products.LibICU)
846847
product_classes.append(products.Swift)

utils/build-script-impl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ KNOWN_SETTINGS=(
208208
install-swiftevolve "" "whether to install the swift-evolve tool"
209209
install-xctest "" "whether to install xctest"
210210
install-foundation "" "whether to install foundation"
211+
install-libcxx "" "whether to install libc++"
211212
install-libdispatch "" "whether to install libdispatch"
212213
install-libicu "" "whether to install libicu"
213214
install-playgroundsupport "" "whether to install PlaygroundSupport"
@@ -3496,6 +3497,9 @@ for host in "${ALL_HOSTS[@]}"; do
34963497
INSTALL_TARGETS=install-$(echo ${LLVM_INSTALL_COMPONENTS} | sed -E 's/;/ install-/g')
34973498
;;
34983499
libcxx)
3500+
if [[ -z "${INSTALL_LIBCXX}" ]] ; then
3501+
continue
3502+
fi
34993503
INSTALL_TARGETS=install-cxx-headers
35003504
;;
35013505
swift)

utils/swift_build_support/swift_build_support/products/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from .cmark import CMark
1414
from .foundation import Foundation
15+
from .libcxx import LibCXX
1516
from .libdispatch import LibDispatch
1617
from .libicu import LibICU
1718
from .llbuild import LLBuild
@@ -28,6 +29,7 @@
2829
'CMark',
2930
'Ninja',
3031
'Foundation',
32+
'LibCXX',
3133
'LibDispatch',
3234
'LibICU',
3335
'LLBuild',
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# swift_build_support/products/libcxx.py -------------------------*- python -*-
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See https://swift.org/LICENSE.txt for license information
9+
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
# ----------------------------------------------------------------------------
12+
13+
from . import product
14+
15+
16+
class LibCXX(product.Product):
17+
pass

0 commit comments

Comments
 (0)