-
Notifications
You must be signed in to change notification settings - Fork 435
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
tiny improvement #1093
base: master
Are you sure you want to change the base?
tiny improvement #1093
Conversation
joeyjiaojg
commented
May 16, 2023
•
edited
Loading
edited
- pass JOBS to build.sh
- pass COMPILE_FLAGS to cmake config
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.
updated, please check again?
10fdd04
to
7660ea6
Compare
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.
done, pls review again.
build.sh
Outdated
@@ -6,11 +6,13 @@ | |||
# Dependencies include: build-essential libncurses5 libncurses-dev cmake zlib1g-dev | |||
set -e # exit on first error | |||
|
|||
jobs=4 | |||
jobs=$(echo $(nproc) || echo $(sysctl -n hw.physicalcpu)) |
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.
Can we make it one line rather than a if condition
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.
Would it be faster when you were trying to build svf using more than 4 threads? I think we can leave it as 4 and people can simply adjust it by themselves
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.
much faster when I use blade with higher jobs.
46333d1
to
23b8c01
Compare
The new patch should be better now. |
OK, no better way I know without using any bash condition variable. |
Ex to build with clang. ``` export LLVM_DIR=/usr/src/clang-android export LLVM_CONFIG=$LLVM_DIR/bin/llvm-config COMPILE_FLAGS="-DCMAKE_CXX_COMPILER=${LLVM_DIR}/bin/clang++ -DLLVM_DIR=${LLVM_DIR}" source build.sh ```
JOBS=$(nproc) bash build.sh
@yuleisui ok, this should be final? people can choose to build with clang and other JOBS value
|