Skip to content

build: build PythonKit with just built toolchain #29911

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 1 commit into from
Feb 19, 2020
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
#
# ----------------------------------------------------------------------------

import os

from . import product
from .. import shell
from .. import targets


class PythonKit(product.Product):
Expand All @@ -27,14 +30,18 @@ def should_build(self, host_target):
return True

def build(self, host_target):
toolchain_path = targets.toolchain_path(self.args.install_destdir,
self.args.install_prefix)
swiftc = os.path.join(toolchain_path, 'usr', 'bin', 'swift')

shell.call([
self.toolchain.cmake,
'-G', 'Ninja',
'-D', 'BUILD_SHARED_LIBS=YES',
'-D', 'CMAKE_INSTALL_PREFIX={}/usr'.format(
self.args.install_destdir),
'-D', 'CMAKE_MAKE_PROGRAM={}'.format(self.toolchain.ninja),
'-D', 'CMAKE_Swift_COMPILER={}'.format(self.toolchain.swiftc),
'-D', 'CMAKE_Swift_COMPILER={}'.format(swiftc),
'-B', self.build_dir,
'-S', self.source_dir,
])
Expand Down