Skip to content

Commit

Permalink
Merge pull request #671 from dkimitsa/fix/simulator-arch-stripping-fr…
Browse files Browse the repository at this point in the history
…om-lib

* fixed: in case of simulator, embedded frameworks/dylibs were stripped for not required arches
  • Loading branch information
Tom-Ski authored Jul 17, 2022
2 parents 01f6bd3 + dc06143 commit 4ae4bc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public void processFile(Resource resource, File file, File destDir) throws IOExc

if (isDynamicLibrary(file)) {
// remove simulator and deprecated archs, also strip bitcode if not used
if (config.getOs() == OS.ios && config.getArch().isArm()) {
if (config.getOs() == OS.ios && config.getArch().getEnv() != Environment.Simulator) {
File libFile = new File(destDir, file.getName());
stripExtraArches(libFile);
if (!config.isEnableBitcode())
Expand Down Expand Up @@ -440,7 +440,7 @@ public boolean processDir(Resource resource, File dir, File destDir) throws IOEx
public void processFile(Resource resource, File file, File destDir) throws IOException {
copyFile(resource, file, destDir);

if (config.getOs() == OS.ios && config.getArch().isArm()) {
if (config.getOs() == OS.ios && config.getArch().getEnv() != Environment.Simulator) {
// remove simulator and deprecated archs, also strip bitcode if not used
if (isAppExtension(file)) {
File libFile = new File(destDir, file.getName());
Expand Down Expand Up @@ -670,7 +670,7 @@ protected void copySwiftLibs(Collection<String> swiftLibraries, File targetDir,
// don't strip if libraries goes to SwiftSupport folder
if (strip) {
// remove simulator and deprecated archs, also strip bitcode if not used
if (config.getOs() == OS.ios && config.getArch().isArm()) {
if (config.getOs() == OS.ios && config.getArch().getEnv() != Environment.Simulator) {
File libFile = new File(targetDir, swiftLibrary.getName());
stripExtraArches(libFile);
if (!config.isEnableBitcode())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public static void lipoRemoveArchs(Config config, File inFile, File outFile, Str
}
args.add("-output");
args.add(outFile);
new Executor(Logger.NULL_LOGGER, getLipo()).args(args).exec();
new Executor(config.getLogger(), getLipo()).args(args).exec();
}


Expand Down

0 comments on commit 4ae4bc1

Please sign in to comment.