Skip to content

Commit 15e08db

Browse files
authored
Merge pull request #87 from benlangmuir/toolchain-path-cp
[5.3] [build-script][test] Remove hard-coded install prefix of /usr and pass it in instead
2 parents e0b44f5 + 7e72c4b commit 15e08db

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/ISDBTibs/TibsToolchain.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ extension TibsToolchain {
118118

119119
let fm = FileManager.default
120120

121-
let envVar = "INDEXSTOREDB_TOOLCHAIN_PATH"
121+
let envVar = "INDEXSTOREDB_TOOLCHAIN_BIN_PATH"
122122
if let path = ProcessInfo.processInfo.environment[envVar] {
123-
let bin = URL(fileURLWithPath: "\(path)/usr/bin", isDirectory: true)
123+
let bin = URL(fileURLWithPath: "\(path)/bin", isDirectory: true)
124124
swiftc = bin.appendingPathComponent("swiftc", isDirectory: false)
125125
clang = bin.appendingPathComponent("clang", isDirectory: false)
126126

Utilities/build-script-helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ def get_swiftpm_options(args):
3333
swiftpm_args += [
3434
# Dispatch headers
3535
'-Xcxx', '-I', '-Xcxx',
36-
os.path.join(args.toolchain, 'usr', 'lib', 'swift'),
36+
os.path.join(args.toolchain, 'lib', 'swift'),
3737
# For <Block.h>
3838
'-Xcxx', '-I', '-Xcxx',
39-
os.path.join(args.toolchain, 'usr', 'lib', 'swift', 'Block'),
39+
os.path.join(args.toolchain, 'lib', 'swift', 'Block'),
4040
]
4141

4242
return swiftpm_args
@@ -66,15 +66,15 @@ def add_common_args(parser):
6666
args.toolchain = os.path.abspath(args.toolchain)
6767

6868
if args.toolchain:
69-
swift_exec = os.path.join(args.toolchain, 'usr', 'bin', 'swift')
69+
swift_exec = os.path.join(args.toolchain, 'bin', 'swift')
7070
else:
7171
swift_exec = 'swift'
7272

7373
swiftpm_args = get_swiftpm_options(args)
7474

7575
env = os.environ
7676
# Set the toolchain used in tests at runtime
77-
env['INDEXSTOREDB_TOOLCHAIN_PATH'] = args.toolchain
77+
env['INDEXSTOREDB_TOOLCHAIN_BIN_PATH'] = args.toolchain
7878

7979
if args.ninja_bin:
8080
env['NINJA_BIN'] = args.ninja_bin

0 commit comments

Comments
 (0)