Releases: holzschu/llvm
Binary release with xcframeworks
llvm, lli, clang... now with frameworks
For easier portability: this release contains all the commands (lli, clang, llvm-link, opt, nm, llvm-dis) as frameworks, ready to be included in an app.
In theory, it should be enough for brave developers to run LLVM and the associated tools inside OpenTerm or other applications. I would recommend the latest version of my OpenTerm fork: https://github.com/holzschu/terminal
To compile projects, use:
-
on your Mac:
clang -S -emit-llvm -arch arm64 -target arm64-apple-darwin17.5.0 -D_FORTIFY_SOURCE=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk <other flags as needed> <filename>.c
-
on your iOS device:
clang -S -emit-llvm -Wno-nullability-completeness -D_FORTIFY_SOURCE=0 -I <path to headers> <filename>.c
(you will need to transfer C and C++ headers to your iOS device. Where you place them is up to you).
In both cases, this creates a ".ll" file in LLVM intermediate representation, which you can then run using lli: lli <filename>.ll
You can link together multiple ".ll" files using llvm-link -only-needed -o <resultname>
.
If you have an existing command that was compiled using "-fembed-bitcode", you can extract the LLVM bitcode from the binary using bitcode retriever: https://github.com/AlexDenisov/bitcode_retriever
This produces a ".bc" file for each source file that was in the original app. You can link them with "llvm-link" and run lli with the result.
"llvm-dis" converts between binary bitcode representation (.bc) and text-based bitcode (.ll). It is included.
"opt" optimises the bitcode after linking: opt -O3 -o=optimized.bc older.bc
"nm" displays the list of symbols in a dynamic library (often, a lot of them).
Difference with v0.3: Everything is available as frameworks.
LLVM, clang, lli with single dynamic library
For easier portability: this release contains the content of "build_ios/bin" and "build_ios/lib/*.dylib" after the bootstrap.sh script.
In theory, it should be enough for brave developers to run LLVM and the associated tools inside OpenTerm or other applications. I would recommend the latest version of my OpenTerm fork: https://github.com/holzschu/terminal
To compile projects, use:
-
on your Mac:
clang -S -emit-llvm -arch arm64 -target arm64-apple-darwin17.5.0 -D_FORTIFY_SOURCE=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk <other flags as needed> <filename>.c
-
on your iOS device:
clang -S -emit-llvm -Wno-nullability-completeness -D_FORTIFY_SOURCE=0 -I <path to headers> <filename>.c
(you will need to transfer C and C++ headers to your iOS device. Where you place them is up to you).
In both cases, this creates a ".ll" file in LLVM intermediate representation, which you can then run using lli: lli <filename>.ll
You can link together multiple ".ll" files using llvm-link -only-needed -o <resultname>
.
If you have an existing command that was compiled using "-fembed-bitcode", you can extract the LLVM bitcode from the binary using bitcode retriever: https://github.com/AlexDenisov/bitcode_retriever
This produces a ".bc" file for each source file that was in the original app. You can link them with "llvm-link" and run lli with the result.
"llvm-dis" converts between binary bitcode representation (.bc) and text-based bitcode (.ll). It is included.
"opt" optimises the bitcode after linking: opt -O3 -o=optimized.bc older.bc
"nm" displays the list of symbols in a dynamic library (often, a lot of them).
Difference with v0.2: llvm is now in a single dynamic library, making the project management much simpler.
LLVM + LLI with more external functions
For easier portability: this release contains the content of "build_ios/bin" and "build_ios/lib/*.dylib" after the bootstrap.sh script.
In theory, it should be enough for brave developers to run LLVM and the associated tools inside OpenTerm or other applications. I would recommend the latest version of my OpenTerm fork: https://github.com/holzschu/terminal
To compile projects, use:
-
on your Mac:
clang -S -emit-llvm -arch arm64 -target arm64-apple-darwin17.5.0 -D_FORTIFY_SOURCE=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk <other flags as needed> <filename>.c
-
on your iOS device:
clang -S -emit-llvm -Wno-nullability-completeness -D_FORTIFY_SOURCE=0 -I <path to headers> <filename>.c
(you will need to transfer C and C++ headers to your iOS device. Where you place them is up to you).
In both cases, this creates a ".ll" file in LLVM intermediate representation, which you can then run using lli: lli <filename>.ll
You can link together multiple ".ll" files using llvm-link -only-needed -o <resultname>
.
If you have an existing command that was compiled using "-fembed-bitcode", you can extract the LLVM bitcode from the binary using bitcode retriever: https://github.com/AlexDenisov/bitcode_retriever
This produces a ".bc" file for each source file that was in the original app. You can link them with "llvm-link" and run lli with the result.
"llvm-dis" converts between binary bitcode representation (.bc) and text-based bitcode (.ll). It is included.
"nm" displays the list of symbols in a dynamic library (often, a lot of them).
Difference with v0.1: some bugs have been removed. Mostly, I added a lot of external functions for a smooth behaviour inside ios_system: printf, scanf, err, warn, open, system...
Precompiled binaries + libraries for iOS
For easier portability: this release contains the content of "build_ios/bin" and "build_ios/lib/*.dylib" after the bootstrap.sh script.
In theory, it should be enough for brave developers to run LLVM and the associated tools inside OpenTerm or other applications. I would recommend the latest version of my OpenTerm fork: https://github.com/holzschu/terminal
To compile projects, use:
-
on your Mac:
clang -S -emit-llvm -arch arm64 -target arm64-apple-darwin17.5.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk <other flags as needed> <filename>.c
-
on your iOS device:
clang -S -emit-llvm -Wno-nullability-completeness -I <path to headers> <filename>.c
(you will need to transfer C and C++ headers to your iOS device. Where you place them is up to you).
In both cases, this creates a ".ll" file in LLVM intermediate representation, which you can then run using lli: lli <filename>.ll
You can link together multiple ".ll" files using llvm-link -only-needed -o <resultname>
.
If you have an existing command that was compiled using "-fembed-bitcode", you can extract the LLVM bitcode from the binary using bitcode retriever: https://github.com/AlexDenisov/bitcode_retriever
This produces a ".bc" file for each source file that was in the original app. You can link them with "llvm-link" and run lli with the result.
"llvm-dis" converts between binary bitcode representation (.bc) and text-based bitcode (.ll). It is included.
"nm" displays the list of symbols in a dynamic library (often, a lot of them).