Skip to content

build-script: Allowing passing of libtool path to llvm. #7340

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 9, 2017
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
12 changes: 12 additions & 0 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,11 @@ class BuildScriptInvocation(object):
"--host-lipo", toolchain.lipo,
]

if toolchain.libtool is not None:
impl_args += [
"--host-libtool", toolchain.libtool,
]

# If we have extra_swift_args, combine all of them together and then
# add them as one command.
if args.extra_swift_args:
Expand Down Expand Up @@ -1937,6 +1942,11 @@ iterations with -O",
help="the absolute path to lipo. Default is auto detected.",
type=arguments.type.executable,
metavar="PATH")
parser.add_argument(
"--host-libtool",
help="the absolute path to libtool. Default is auto detected.",
type=arguments.type.executable,
metavar="PATH")
parser.add_argument(
"--distcc",
help="use distcc in pump mode",
Expand Down Expand Up @@ -2116,6 +2126,8 @@ iterations with -O",
toolchain.cxx = args.host_cxx
if args.host_lipo is not None:
toolchain.lipo = args.host_lipo
if args.host_libtool is not None:
toolchain.libtool = args.host_libtool
if args.cmake is not None:
toolchain.cmake = args.cmake

Expand Down
8 changes: 8 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ KNOWN_SETTINGS=(
host-cc "" "the path to CC, the 'clang' compiler for the host platform. **This argument is required**"
host-cxx "" "the path to CXX, the 'clang++' compiler for the host platform. **This argument is required**"
host-lipo "" "the path to lipo for creating universal binaries on Darwin"
host-libtool "" "the path to libtool"
darwin-xcrun-toolchain "default" "the name of the toolchain to use on Darwin"
ninja-bin "" "the path to Ninja tool"
cmark-build-type "Debug" "the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
Expand Down Expand Up @@ -1987,6 +1988,13 @@ for host in "${ALL_HOSTS[@]}"; do
build_targets=(llvm-tblgen clang-headers)
fi

if [ "${HOST_LIBTOOL}" ] ; then
cmake_options=(
"${cmake_options[@]}"
-DCMAKE_LIBTOOL:PATH="${HOST_LIBTOOL}"
)
fi

# Note: we set the variable:
#
# LLVM_TOOL_SWIFT_BUILD
Expand Down
1 change: 1 addition & 0 deletions utils/swift_build_support/swift_build_support/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def _getter(self):
_register("llvm_profdata", "llvm-profdata")
_register("llvm_cov", "llvm-cov")
_register("lipo", "lipo")
_register("libtool", "libtool")


class Darwin(Toolchain):
Expand Down