-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix PAL double initialize #2296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d858bf9
Fix PAL double initialize
obastemur 694b5e8
android: fix memory status
obastemur fe0d176
android: fix cs native data size for ARMv7 Android
obastemur a167b47
fix: set isLowMemoryDevice for Android and iOS
obastemur 9eefb70
explicitly set O0 for debug builds to prevent custom default option o…
obastemur eefe40b
pal: fix missing semicolon issue with PAL Trace - ERROR command
obastemur 42eda8e
InitializeCriticalSectionAndSpinCount duplicate definition
obastemur 85fe1ac
android: fix ranlib mixup and remove post ranlib call
obastemur 50afb95
trace: add builtin experimental trace support
obastemur 4f024b3
ld: reduce link time memory usage
obastemur 880222a
arm: do not require --arch when compiling on ARM Linux
obastemur fc95140
xplat: bring clang/llvm/bintools-gold and prepare for ChakraCore
obastemur ef987bb
arm-xplat: fix _get_va [ip + fp]
obastemur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -95,3 +95,4 @@ deps/ | |
|
|
||
| .DS_Store | ||
| android-toolchain-arm/ | ||
| cc-toolchain/ | ||
This file contains hidden or 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 hidden or 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,122 @@ | ||
| #!/bin/bash | ||
| #------------------------------------------------------------------------------------------------------- | ||
| # Copyright (C) Microsoft. All rights reserved. | ||
| # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
| #------------------------------------------------------------------------------------------------------- | ||
|
|
||
| LLVM_VERSION="3.9.1" | ||
|
|
||
| CC_URL="git://sourceware.org/git/binutils-gdb.git\nhttp://llvm.org/releases/${LLVM_VERSION}/\n" | ||
| echo -e "\n----------------------------------------------------------------" | ||
| echo -e "\nThis script will download LLVM/CLANG and LLVM Gold Bintools from\n${CC_URL}\n" | ||
| echo "These software are licensed to you by its publisher(s), not Microsoft." | ||
| echo "Microsoft is not responsible for the software." | ||
| echo "Your installation and use of the software is subject to the publisher’s terms available here:" | ||
| echo -e "http://llvm.org/docs/DeveloperPolicy.html#license\nhttp://llvm.org/docs/GoldPlugin.html#licensing\n" | ||
| echo -e "----------------------------------------------------------------\n" | ||
| echo "If you don't agree, press Ctrl+C to terminate" | ||
| read -t 10 -p "Hit ENTER to continue (or wait 10 seconds)" | ||
|
|
||
| echo -e "\nThis will take some time... [and free memory 2GB+]\n" | ||
|
|
||
| ROOT=${PWD}/cc-toolchain/ | ||
| GOLD_PLUGIN="" | ||
|
|
||
| if [ ! -d ./cc-toolchain/src/llvm/projects/compiler-rt ]; then | ||
| rm -rf cc-toolchain | ||
| mkdir cc-toolchain | ||
| cd cc-toolchain | ||
| mkdir src | ||
| mkdir bin | ||
| cd src | ||
|
|
||
| apt-get -v >/dev/null 2>&1 | ||
| if [ $? == 0 ]; then # debian | ||
| sudo apt-get install -y apt-file texinfo texi2html csh gawk automake libtool libtool-bin bison flex libncurses5-dev | ||
| if [ $? != 0 ]; then | ||
| exit 1 | ||
| fi | ||
| else | ||
| yum -v >/dev/null 2>&1 | ||
| if [ $? == 0 ]; then # redhat | ||
| yum install -y texinfo texi2html csh gawk automake libtool libtool-bin bison flex ncurses-devel | ||
| else | ||
| echo "This script requires (texinfo texi2html csh gawk automake libtool libtool-bin bison flex ncurses-devel)" | ||
| echo "Automated installation of these requirements is supported with apt-get and yum only." | ||
| echo "" | ||
| echo "If you don't have these packages are installed, press Ctrl+C to terminate" | ||
| read -t 10 -p "Hit ENTER to continue (or wait 10 seconds)" | ||
| fi | ||
| fi | ||
|
|
||
| mkdir lto_utils | ||
| cd lto_utils | ||
| echo "Downloading LLVM Gold Plugin" | ||
| git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils >/dev/null 2>&1 | ||
| mkdir binutils_compile; cd binutils_compile | ||
| ../binutils/configure --enable-gold --enable-plugins --disable-werror --prefix="${ROOT}/build" | ||
| make -j2 | ||
| make install | ||
| if [ $? != 0 ]; then | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo -e "\n\n\n\n" | ||
| cd "${ROOT}/src/" | ||
|
|
||
| echo "Downloading LLVM ${LLVM_VERSION}" | ||
| wget –quiet "http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1 | ||
| tar -xf "llvm-${LLVM_VERSION}.src.tar.xz" | ||
| if [ $? == 0 ]; then | ||
| rm "llvm-${LLVM_VERSION}.src.tar.xz" | ||
| mv "llvm-${LLVM_VERSION}.src" llvm | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| cd llvm/tools/ | ||
| echo "Downloading Clang ${LLVM_VERSION}" | ||
| wget –quiet "http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1 | ||
| tar -xf "cfe-${LLVM_VERSION}.src.tar.xz" | ||
| if [ $? == 0 ]; then | ||
| mv "cfe-${LLVM_VERSION}.src" clang | ||
| rm "cfe-${LLVM_VERSION}.src.tar.xz" | ||
| else | ||
| exit 1 | ||
| fi | ||
|
|
||
| mkdir -p ../projects/ | ||
| cd ../projects/ | ||
| echo "Downloading Compiler-RT ${LLVM_VERSION}" | ||
| wget –quiet "http://llvm.org/releases/${LLVM_VERSION}/compiler-rt-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1 | ||
| tar -xf "compiler-rt-${LLVM_VERSION}.src.tar.xz" | ||
| if [ $? == 0 ]; then | ||
| mv "compiler-rt-${LLVM_VERSION}.src" compiler-rt | ||
| rm "compiler-rt-${LLVM_VERSION}.src.tar.xz" | ||
| else | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| GOLD_PLUGIN=-DLLVM_BINUTILS_INCDIR="${ROOT}/src/lto_utils/binutils/include" | ||
|
|
||
| mkdir -p "${ROOT}/build" | ||
| cd "${ROOT}/src/llvm" | ||
| mkdir -p build_ | ||
| cd build_ | ||
|
|
||
| cmake ../ -DCMAKE_INSTALL_PREFIX="${ROOT}/build" -DCMAKE_BUILD_TYPE=Release ${GOLD_PLUGIN} | ||
|
|
||
| if [ $? != 0 ]; then | ||
| cd .. | ||
| rm -rf build_ | ||
| mkdir build_ | ||
| exit 1 | ||
| fi | ||
|
|
||
| make -j4 install | ||
|
|
||
| if [ $? == 0 ]; then | ||
| echo -e "Done!\n./build.sh args are given below;\n\n" | ||
| echo "--cxx=${ROOT}/build/bin/clang++ --cc=${ROOT}/build/bin/clang" | ||
| fi | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @digitalinfinity