annotate README.md @ 27:c4e2ca100ab9 default tip

llvm worked
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 25 Oct 2024 17:10:11 +0900
parents e84ea6c0d359
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 # How to build small compiler examples
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 # on macOS
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 ```
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 brew install cmake
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 cmake -DCMAKE_MAKE_PROGRAM=make
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 ```
e84ea6c0d359 add README
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
27
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
11 # run on lldb
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
12
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
13 ```
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
14 lldb ./s-llvm
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
15 (lldb) b main
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
16 (lldb) process launch -i s-input.txt
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
17 ```
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
18
c4e2ca100ab9 llvm worked
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
19