Skip to content

Commit 480e0d7

Browse files
author
Doug Coleman
committed
build-script: Allowing passing of libtool path to llvm.
1 parent d539b67 commit 480e0d7

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

utils/build-script

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,11 @@ class BuildScriptInvocation(object):
784784
"--host-lipo", toolchain.lipo,
785785
]
786786

787+
if toolchain.libtool is not None:
788+
impl_args += [
789+
"--host-libtool", toolchain.libtool,
790+
]
791+
787792
# If we have extra_swift_args, combine all of them together and then
788793
# add them as one command.
789794
if args.extra_swift_args:
@@ -1937,6 +1942,11 @@ iterations with -O",
19371942
help="the absolute path to lipo. Default is auto detected.",
19381943
type=arguments.type.executable,
19391944
metavar="PATH")
1945+
parser.add_argument(
1946+
"--host-libtool",
1947+
help="the absolute path to libtool. Default is auto detected.",
1948+
type=arguments.type.executable,
1949+
metavar="PATH")
19401950
parser.add_argument(
19411951
"--distcc",
19421952
help="use distcc in pump mode",
@@ -2116,6 +2126,8 @@ iterations with -O",
21162126
toolchain.cxx = args.host_cxx
21172127
if args.host_lipo is not None:
21182128
toolchain.lipo = args.host_lipo
2129+
if args.host_libtool is not None:
2130+
toolchain.libtool = args.host_libtool
21192131
if args.cmake is not None:
21202132
toolchain.cmake = args.cmake
21212133

utils/build-script-impl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ KNOWN_SETTINGS=(
4848
host-cc "" "the path to CC, the 'clang' compiler for the host platform. **This argument is required**"
4949
host-cxx "" "the path to CXX, the 'clang++' compiler for the host platform. **This argument is required**"
5050
host-lipo "" "the path to lipo for creating universal binaries on Darwin"
51+
host-libtool "" "the path to libtool"
5152
darwin-xcrun-toolchain "default" "the name of the toolchain to use on Darwin"
5253
ninja-bin "" "the path to Ninja tool"
5354
cmark-build-type "Debug" "the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
@@ -1987,6 +1988,13 @@ for host in "${ALL_HOSTS[@]}"; do
19871988
build_targets=(llvm-tblgen clang-headers)
19881989
fi
19891990

1991+
if [ "${HOST_LIBTOOL}" ] ; then
1992+
cmake_options=(
1993+
"${cmake_options[@]}"
1994+
-DCMAKE_LIBTOOL:PATH="${HOST_LIBTOOL}"
1995+
)
1996+
fi
1997+
19901998
# Note: we set the variable:
19911999
#
19922000
# LLVM_TOOL_SWIFT_BUILD

utils/swift_build_support/swift_build_support/toolchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def _getter(self):
5252
_register("llvm_profdata", "llvm-profdata")
5353
_register("llvm_cov", "llvm-cov")
5454
_register("lipo", "lipo")
55+
_register("libtool", "libtool")
5556

5657

5758
class Darwin(Toolchain):

0 commit comments

Comments
 (0)