mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Rather than use pre-generated swiftmodule files, generate an empty module and then replace the target triple embedded in it. This unfortunately necessitates an external script beacuse typical command-line tools are not meant for operating on binary files. Swift SVN r24556
10 lines
155 B
Python
Executable File
10 lines
155 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import sys
|
|
|
|
(_, old, new) = sys.argv
|
|
assert(len(old) == len(new))
|
|
|
|
data = sys.stdin.read()
|
|
sys.stdout.write(data.replace(old, new))
|