Skip to content

Commit

Permalink
Use Ninja to build LPython
Browse files Browse the repository at this point in the history
  • Loading branch information
Thirumalai-Shaktivel committed Nov 29, 2022
1 parent ffd8770 commit 58c86fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ inst/bin/*
*.recipe
*.sln
*.dll
*.manifest

### https://raw.github.com/github/gitignore/218a941be92679ce67d0484547e3e142b2f5f6f0/Global/macOS.gitignore

Expand Down
4 changes: 3 additions & 1 deletion build0_win.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ python grammar/asdl_py.py
python src/libasr/asdl_cpp.py grammar/Python.asdl src/lpython/python_ast.h
# Generate a Fortran ASR from ASR.asdl (C++)
python src/libasr/asdl_cpp.py src/libasr/ASR.asdl src/libasr/asr.h
# Generate a wasm_visitor.h from src/libasr/wasm_instructions.txt (C++)
python src/libasr/wasm_instructions_visitor.py

# Generate the tokenizer and parser
pushd src/lpython/parser && re2c -W -b tokenizer.re -o tokenizer.cpp && popd
pushd src/lpython/parser && bison -Wall -d -r all parser.yy && popd
python src/libasr/wasm_instructions_visitor.py
5 changes: 3 additions & 2 deletions build1.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
cmake ^
-DCMAKE_BUILD_TYPE=Release ^
-DWITH_LLVM=yes ^
-DLFORTRAN_BUILD_ALL=yes ^
-DLPYTHON_BUILD_ALL=yes ^
-DWITH_STACKTRACE=no ^
-DCMAKE_PREFIX_PATH="%CONDA_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX=%cd%/inst ^
.
. -G "Ninja"

cmake --build . --config Release -j8 --target install

0 comments on commit 58c86fe

Please sign in to comment.