@@ -67,6 +67,7 @@ def build(self, host_target):
67
67
toolchain_file = self .generate_linux_toolchain_file (platform , arch )
68
68
self .cmake_options .define ('CMAKE_TOOLCHAIN_FILE:PATH' , toolchain_file )
69
69
70
+ self .cmake_options .define ('CMAKE_INSTALL_PREFIX:PATH' , self .args .install_prefix )
70
71
self .build_with_cmake (["all" ], self .args .swift_build_variant , [])
71
72
72
73
def should_test (self , host_target ):
@@ -77,17 +78,18 @@ def test(self, host_target):
77
78
pass
78
79
79
80
def should_install (self , host_target ):
80
- # This product is for the swift-syntax used with the build-directory compiler.
81
- # If a toolchain install is required, please use the SwiftSyntax (no 'Early')
82
- # product with `--swift-syntax --install-swift-syntax`.
83
- return False
81
+ """should_install() -> Bool
84
82
85
- @classmethod
86
- def is_ignore_install_all_product (cls ):
87
- # Ensures that `install_all` setting triggered by `--infer` does not
88
- # affect products which specify `is_ignore_install_all_product` as
89
- # True. This is useful for products which should not be installed into the
90
- # toolchain (corresponding build products that use the just-built
91
- # toolchain are the products that get installed, e.g. `swiftsyntax` to
92
- # `earlyswiftsyntax`).
93
- return True
83
+ Whether or not this product should be installed with the given
84
+ arguments.
85
+ """
86
+ return self .args .install_all
87
+
88
+ def install (self , host_target ):
89
+ """
90
+ Perform the install phase for the product.
91
+
92
+ This phase might copy the artifacts from the previous phases into a
93
+ destination directory.
94
+ """
95
+ self .install_with_cmake (["install" ], self .host_install_destdir (host_target ))
0 commit comments