Skip to content

[build-script] Add Product for libc++ #22346

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

Merged
merged 3 commits into from
Feb 4, 2019
Merged
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
2 changes: 2 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ install-libicu
install-prefix=/usr
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;stdlib;swift-remote-mirror;sdk-overlay;parser-lib;license;sourcekit-inproc
llvm-install-components=llvm-cov;llvm-profdata;IndexStore;clang;clang-headers;compiler-rt;clangd
install-libcxx
build-swift-static-stdlib
build-swift-static-sdk-overlay
build-swift-stdlib-unittest-extra
Expand Down Expand Up @@ -1082,6 +1083,7 @@ reconfigure

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

# Path to the .tar.gz package we would create.
installable-package=%(installable_package)s
Expand Down
1 change: 1 addition & 0 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ class BuildScriptInvocation(object):
product_classes = []
product_classes.append(products.CMark)
product_classes.append(products.LLVM)
product_classes.append(products.LibCXX)
if self.args.build_libicu:
product_classes.append(products.LibICU)
product_classes.append(products.Swift)
Expand Down
4 changes: 4 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ KNOWN_SETTINGS=(
install-swiftevolve "" "whether to install the swift-evolve tool"
install-xctest "" "whether to install xctest"
install-foundation "" "whether to install foundation"
install-libcxx "" "whether to install libc++"
install-libdispatch "" "whether to install libdispatch"
install-libicu "" "whether to install libicu"
install-playgroundsupport "" "whether to install PlaygroundSupport"
Expand Down Expand Up @@ -3504,6 +3505,9 @@ for host in "${ALL_HOSTS[@]}"; do
INSTALL_TARGETS=install-$(echo ${LLVM_INSTALL_COMPONENTS} | sed -E 's/;/ install-/g')
;;
libcxx)
if [[ -z "${INSTALL_LIBCXX}" ]] ; then
continue
fi
INSTALL_TARGETS=install-cxx-headers
;;
swift)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from .cmark import CMark
from .foundation import Foundation
from .libcxx import LibCXX
from .libdispatch import LibDispatch
from .libicu import LibICU
from .llbuild import LLBuild
Expand All @@ -28,6 +29,7 @@
'CMark',
'Ninja',
'Foundation',
'LibCXX',
'LibDispatch',
'LibICU',
'LLBuild',
Expand Down
17 changes: 17 additions & 0 deletions utils/swift_build_support/swift_build_support/products/libcxx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# swift_build_support/products/libcxx.py -------------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
# ----------------------------------------------------------------------------

from . import product


class LibCXX(product.Product):
pass