Skip to content

Commit d3d3605

Browse files
Gonzalo Larraldeparkera
Gonzalo Larralde
authored andcommitted
Android SDK name changes. (swiftlang#758)
* Android SDK name added. The OSType remains as Linux, but the platform specific files should be pulled from the android sdk instead of linux. * Hardcoded linux sdk replaced by $OS for conformance_begin/end objects.
1 parent d6f7085 commit d3d3605

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: lib/product.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def __init__(self, name):
117117

118118
def generate(self):
119119
if Configuration.current.target.sdk == OSType.Linux or Configuration.current.target.sdk == OSType.FreeBSD:
120-
self.conformance_begin = '${SDKROOT}/lib/swift/linux/${ARCH}/swift_begin.o'
121-
self.conformance_end = '${SDKROOT}/lib/swift/linux/${ARCH}/swift_end.o'
120+
self.conformance_begin = '${SDKROOT}/lib/swift/${OS}/${ARCH}/swift_begin.o'
121+
self.conformance_end = '${SDKROOT}/lib/swift/${OS}/${ARCH}/swift_end.o'
122122
return Library.generate(self, ["-shared", "-Wl,-soname," + self.product_name, "-Wl,--no-undefined"])
123123
else:
124124
return Library.generate(self, ["-shared"])

Diff for: lib/target.py

+2
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ def swift_triple(self):
407407
def swift_sdk_name(self):
408408
if self.sdk == OSType.MacOSX:
409409
return "macosx"
410+
elif self.sdk == OSType.Linux and "android" in self.triple:
411+
return "android"
410412
elif self.sdk == OSType.Linux:
411413
return "linux"
412414
elif self.sdk == OSType.FreeBSD:

0 commit comments

Comments
 (0)