Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Bred <bredpetr@gmail.com>2017-11-14 17:54:18 +0300
committerJan Kotas <jkotas@microsoft.com>2017-11-14 17:54:18 +0300
commita073d8511ade2968f30ffb0cc753850129b0f5f9 (patch)
tree47ef2977c9ae0d695997d71a74aac93db961a207 /Documentation
parent427e9b6e42e68d0f3fe9092988ce8626b4a3e4be (diff)
[ObjWriter] Refactoring documentation (#4929)
Signed-off-by: Petr Bred <bredpetr@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/cross-building.md12
-rw-r--r--Documentation/how-to-build-ObjectWriter.md24
2 files changed, 15 insertions, 21 deletions
diff --git a/Documentation/cross-building.md b/Documentation/cross-building.md
index 04d2881d9..d61613b9b 100644
--- a/Documentation/cross-building.md
+++ b/Documentation/cross-building.md
@@ -93,17 +93,7 @@ cp ${WORKING_DIR}/libarmelnonjit.so ${WORKING_DIR}/libclrjitilc.so
# cp ${WORKING_DIR}/libprotojit.so ${WORKING_DIR}/libclrjitilc.so
```
-6. Build libobjwriter. You have to compile it on x86 chroot. Before compiling put coreclr/bin/Product/Linux.x86.Debug/ to some folder on x86 chroot as well. Versions which to used are mentioned on GitHub:
-https://github.com/dotnet/corert/issues/3776#issuecomment-337682166
-
- And apply patch:
-https://gist.github.com/alpencolt/ec75fcc05d8c4ffbf143a052f7c115a8
-```
-mkdir build
-cd build
-cmake ../ -DWITH_CORECLR=../../coreclr/bin/Product/Linux.x86.Debug/ -DLLVM_TARGET_ARCH="ARM;X86" -DLLVM_TARGETS_TO_BUILD="ARM;X86" -DLLVM_DEFAULT_TARGET_TRIPLE=thumbv7-linux-gnueabi -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=1 -DLLVM_LINK_LLVM_DYLIB=1 -DLLVM_OPTIMIZED_TABLEGEN=1 -DHAVE_POSIX_SPAWN=0 -DLLVM_ENABLE_PIC=1 -DLLVM_BUILD_TESTS=0 -DLLVM_ENABLE_DOXYGEN=0 -DLLVM_INCLUDE_DOCS=0 -DLLVM_INCLUDE_TESTS=0 -DLLVM_BINUTILS_INCDIR=/usr/include
-make -j8 objwriter
-```
+6. [Build ObjectWriter library](how-to-build-ObjectWriter.md). You have to compile it on x86 chroot.
7. And to execute use:
```
diff --git a/Documentation/how-to-build-ObjectWriter.md b/Documentation/how-to-build-ObjectWriter.md
index a848a02ce..3f20e177c 100644
--- a/Documentation/how-to-build-ObjectWriter.md
+++ b/Documentation/how-to-build-ObjectWriter.md
@@ -1,37 +1,41 @@
# Build ObjectWriter library #
ObjWriter is based on LLVM, so it requires recent CMake and GCC/Clang to build LLVM.
-See http://llvm.org/docs/GettingStarted.html#requirements for more details.
+See [LLVM requirements](http://llvm.org/docs/GettingStarted.html#requirements) for more details.
1. Clone LLVM from official LLVM mirror github git repository:
```
- $ git clone -b release_50 https://github.com/llvm-mirror/llvm.git
+ git clone -b release_50 https://github.com/llvm-mirror/llvm.git
```
2. Copy ObjWriter directory from CoreRT into LLVM tree
```
- $ cp -r CoreRT/src/Native/ObjWriter llvm/tools/
+ cp -r CoreRT/src/Native/ObjWriter llvm/tools/
```
3. Apply the patch to LLVM:
```
- $ cd llvm
- $ git apply tools/ObjWriter/llvm.patch
+ cd llvm
+ git apply tools/ObjWriter/llvm.patch
```
4. Configure and build LLVM with ObjWriter:
```
- $ mkdir build
- $ cd build
- $ cmake ../ -DCMAKE_BUILD_TYPE=Release -DLLVM_OPTIMIZED_TABLEGEN=1 -DHAVE_POSIX_SPAWN=0 -DLLVM_ENABLE_PIC=1 -DLLVM_BUILD_TESTS=0 -DLLVM_ENABLE_DOXYGEN=0 -DLLVM_INCLUDE_DOCS=0 -DLLVM_INCLUDE_TESTS=0
- $ make -j10 objwriter
- $ cd ..
+ mkdir build
+ cd build
+ cmake ../ -DCMAKE_BUILD_TYPE=Release -DLLVM_OPTIMIZED_TABLEGEN=1 -DHAVE_POSIX_SPAWN=0 -DLLVM_ENABLE_PIC=1 -DLLVM_BUILD_TESTS=0 -DLLVM_ENABLE_DOXYGEN=0 -DLLVM_INCLUDE_DOCS=0 -DLLVM_INCLUDE_TESTS=0
+ make -j10 objwriter
+ cd ..
```
+* For ARM(cross/non-cross) please specify Triple for LLVM as Cmake configuration option:
+ ```
+ -DLLVM_DEFAULT_TARGET_TRIPLE=thumbv7-linux-gnueabi
+ ```
* You can change the building type(CMAKE_BUILD_TYPE) to the debugging type(Debug), if necessary to debug ObjWriter.
* Also, you can do this under chroot to building ObjWriter for other platforms.