forked from MobiVM/robovm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* m1: compiler adaptation -- Environment parameter
This commit adds `Environment (Native/Simulator)` option that allows makes targets different when building for Arch. For example build for `arm64` now could be targeted to `ios-arm64`, `macosx-arm64`, `ios-arm64-simulator`. LLVM detects proper target from triple and it is being generated now with respect to `Environment` option. Also linker `-miphoneos-version-min=` parameter was replaced with `--target=` one that accepts the tripple. Changes were done to folder names: environment is being attached to every arch name where applicable. For example: ``` vm/lib/arm64/ vm/lib/arm64-simulator vm/lib/thumbv7 vm/lib/x86-simulator vm/lib/x86_64-simulator ```
- Loading branch information
Showing
23 changed files
with
187 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
compiler/compiler/src/main/java/org/robovm/compiler/config/Environment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.robovm.compiler.config; | ||
|
||
/** | ||
* Specifies environment kind build/deployment is targeted | ||
* @author dkimitsa | ||
*/ | ||
public enum Environment { | ||
Native(""), | ||
Simulator("simulator"); | ||
|
||
private final String llvmName; | ||
|
||
Environment(String llvmName) { | ||
this.llvmName = llvmName; | ||
} | ||
|
||
public String getLlvmName() { | ||
return llvmName; | ||
} | ||
|
||
public String asLlvmSuffix(String prefix) { | ||
return (llvmName != null && !llvmName.isEmpty()) ? (prefix + llvmName) : ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.