Skip to content

Commit b45fbfa

Browse files
committed
xtensa support
1 parent 4c78aa1 commit b45fbfa

File tree

85,451 files changed

+18847773
-193297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85,451 files changed

+18847773
-193297
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
# bootstrap-zig
1+
# zig-espressif-bootstrap
2+
3+
**Note:** This fork adds new CPUs for xtensa targets, replacing llvm-upstream to espressif-llvm fork.
4+
5+
- **Xtensa**
6+
- esp32
7+
- esp32s2
8+
- esp32s3
9+
- esp8266
10+
- cannon lake
211

312
The purpose of this project is to start with minimum system dependencies and
413
end with a fully operational Zig compiler for any target.
@@ -8,10 +17,10 @@ end with a fully operational Zig compiler for any target.
817
This repository copies sources from upstream. Patches listed below. Use git
918
to find and inspect the patch diffs.
1019

11-
* LLVM, LLD, Clang 17.0.6
20+
* LLVM, LLD, Clang 17.0.1 ([espressif fork](https://github.com/espressif/llvm-project))
1221
* zlib 1.3
1322
* zstd 1.5.2
14-
* zig 0.12.0-dev.2058+04ac028a2
23+
* zig 0.12.0-dev.xtensa.2858+8e52bb152
1524

1625
For other versions, check the git tags of this repository.
1726

build

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TARGET="$1" # Example: riscv64-linux-gnu
77
MCPU="$2" # Examples: `baseline`, `native`, `generic+v7a`, or `arm1176jzf_s`
88

99
ROOTDIR="$(pwd)"
10-
ZIG_VERSION="0.12.0-dev.2058+04ac028a2"
10+
ZIG_VERSION="0.12.0-dev.xtensa.2858+8e52bb152"
1111

1212
TARGET_OS_AND_ABI=${TARGET#*-} # Example: linux-gnu
1313

@@ -50,6 +50,7 @@ cmake "$ROOTDIR/llvm" \
5050
-DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF \
5151
-DCLANG_TOOL_ARCMT_TEST_BUILD=OFF \
5252
-DCLANG_TOOL_C_ARCMT_TEST_BUILD=OFF \
53+
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=Xtensa \
5354
-DCLANG_TOOL_LIBCLANG_BUILD=OFF
5455
cmake --build . --target install
5556

@@ -185,6 +186,7 @@ cmake "$ROOTDIR/llvm" \
185186
-DCLANG_TOOL_C_ARCMT_TEST_BUILD=OFF \
186187
-DCLANG_TOOL_LIBCLANG_BUILD=OFF \
187188
-DLIBCLANG_BUILD_STATIC=ON \
189+
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=Xtensa \
188190
-DLLD_BUILD_TOOLS=OFF
189191
cmake --build . --target install
190192

@@ -194,9 +196,9 @@ $ZIG build \
194196
--prefix "$ROOTDIR/out/zig-$TARGET-$MCPU" \
195197
--search-prefix "$ROOTDIR/out/$TARGET-$MCPU" \
196198
-Dflat \
199+
-Dllvm-has-xtensa \
197200
-Dstatic-llvm \
198-
-Doptimize=ReleaseFast \
199-
-Dstrip \
201+
-Doptimize=ReleaseSafe \
200202
-Dtarget="$TARGET" \
201203
-Dcpu="$MCPU" \
202204
-Dversion-string="$ZIG_VERSION"

build.bat

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if "%VSCMD_ARG_HOST_ARCH%"=="x86" set OUTDIR=out-win-x86
3535

3636
set ROOTDIR=%~dp0
3737
set "ROOTDIR_CMAKE=%ROOTDIR:\=/%"
38-
set ZIG_VERSION=0.11.0-dev.995+7350f0d9b
38+
set ZIG_VERSION=0.12.0-dev.xtensa.2858+8e52bb152
3939

4040
set JOBS_ARG=
4141

@@ -88,6 +88,7 @@ cmake "%ROOTDIR%/llvm" ^
8888
-DCLANG_TOOL_C_ARCMT_TEST_BUILD=OFF ^
8989
-DCLANG_TOOL_LIBCLANG_BUILD=OFF ^
9090
-DLLVM_USE_CRT_RELEASE=MT ^
91+
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=Xtensa ^
9192
-DLLVM_BUILD_LLVM_C_DYLIB=NO
9293
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
9394
cmake --build . %JOBS_ARG% --target install
@@ -236,6 +237,7 @@ cmake "%ROOTDIR%/llvm" ^
236237
-DLLVM_INCLUDE_EXAMPLES=OFF ^
237238
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
238239
-DLLVM_INCLUDE_DOCS=OFF ^
240+
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=Xtensa ^
239241
-DLLVM_DEFAULT_TARGET_TRIPLE=%TARGET% ^
240242
-DLLVM_TOOL_LLVM_LTO2_BUILD=OFF ^
241243
-DLLVM_TOOL_LLVM_LTO_BUILD=OFF ^
@@ -266,8 +268,8 @@ cd "%ROOTDIR%\zig"
266268
--search-prefix "%ROOTDIR%%OUTDIR%\%TARGET%-%MCPU%" ^
267269
-Dflat ^
268270
-Dstatic-llvm ^
269-
-Doptimize=ReleaseFast ^
270-
-Dstrip ^
271+
-Doptimize=ReleaseSafe ^
272+
-Dllvm-has-xtensa ^
271273
-Dtarget="%TARGET%" ^
272274
-Dcpu="%MCPU%" ^
273275
-Dversion-string="%ZIG_VERSION%"

clang/.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BasedOnStyle: LLVM

clang/CodeOwners.rst

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
=================
2+
Clang Code Owners
3+
=================
4+
5+
This file is a list of the people responsible for ensuring that patches for a
6+
particular part of Clang are reviewed, either by themself or by someone else.
7+
They are also the gatekeepers for their part of Clang, with the final word on
8+
what goes in or not.
9+
10+
.. contents::
11+
:depth: 2
12+
:local:
13+
14+
Current Code Owners
15+
===================
16+
The following people are the active code owners for the project. Please reach
17+
out to them for code reviews, questions about their area of expertise, or other
18+
assistance.
19+
20+
All parts of Clang not covered by someone else
21+
----------------------------------------------
22+
| Aaron Ballman
23+
| aaron\@aaronballman.com (email), aaron.ballman (Phabricator), AaronBallman (GitHub)
24+
25+
26+
Contained Components
27+
--------------------
28+
These code owners are responsible for particular high-level components within
29+
Clang that are typically contained to one area of the compiler.
30+
31+
AST matchers
32+
~~~~~~~~~~~~
33+
| Manuel Klimek
34+
| klimek\@google.com (email), klimek (Phabricator), r4nt (GitHub)
35+
36+
37+
Clang LLVM IR generation
38+
~~~~~~~~~~~~~~~~~~~~~~~~
39+
| John McCall
40+
| rjmccall\@apple.com (email), rjmccall (Phabricator), rjmccall (GitHub)
41+
42+
| Eli Friedman
43+
| efriedma\@quicinc.com (email), efriedma (Phabricator), efriedma-quic (GitHub)
44+
45+
| Anton Korobeynikov
46+
| anton\@korobeynikov.info (email), asl (Phabricator), asl (GitHub)
47+
48+
49+
Analysis & CFG
50+
~~~~~~~~~~~~~~
51+
| Dmitri Gribenko
52+
| gribozavr\@gmail.com (email), gribozavr (Phabricator), gribozavr (GitHub)
53+
54+
| Yitzhak Mandelbaum
55+
| yitzhakm\@google.com (email), ymandel (Phabricator), ymand (GitHub)
56+
57+
| Stanislav Gatev
58+
| sgatev\@google.com (email), sgatev (Phabricator), sgatev (GitHub)
59+
60+
61+
Experimental new constant interpreter
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63+
| Timm Bäder
64+
| [email protected] (email), tbaeder (Phabricator), tbaederr (GitHub)
65+
66+
67+
Modules & serialization
68+
~~~~~~~~~~~~~~~~~~~~~~~
69+
| Chuanqi Xu
70+
| yedeng.yd\@linux.alibaba.com (email), ChuanqiXu (Phabricator), ChuanqiXu9 (GitHub)
71+
72+
| Michael Spencer
73+
| bigcheesegs\@gmail.com (email), Bigcheese (Phabricator), Bigcheese (GitHub)
74+
75+
76+
Templates
77+
~~~~~~~~~
78+
| Erich Keane
79+
| erich.keane\@intel.com (email), ErichKeane (Phabricator), erichkeane (GitHub)
80+
81+
82+
Debug information
83+
~~~~~~~~~~~~~~~~~
84+
| Adrian Prantl
85+
| aprantl\@apple.com (email), aprantl (Phabricator), adrian-prantl (GitHub)
86+
87+
| David Blaikie
88+
| dblaikie\@gmail.com (email), dblaikie (Phabricator), dwblaikie (GitHub)
89+
90+
| Eric Christopher
91+
| echristo\@gmail.com (email), echristo (Phabricator), echristo (GitHub)
92+
93+
94+
Exception handling
95+
~~~~~~~~~~~~~~~~~~
96+
| Anton Korobeynikov
97+
| anton\@korobeynikov.info (email), asl (Phabricator), asl (GitHub)
98+
99+
100+
Clang static analyzer
101+
~~~~~~~~~~~~~~~~~~~~~
102+
| Artem Dergachev
103+
| adergachev\@apple.com (email), NoQ (Phabricator), haoNoQ (GitHub)
104+
105+
| Gábor Horváth
106+
| xazax.hun\@gmail.com (email), xazax.hun (Phabricator), Xazax-hun (GitHub)
107+
108+
109+
Compiler options
110+
~~~~~~~~~~~~~~~~
111+
| Jan Svoboda
112+
| jan_svoboda\@apple.com (email), jansvoboda11 (Phabricator), jansvoboda11 (GitHub)
113+
114+
115+
OpenBSD driver
116+
~~~~~~~~~~~~~~
117+
| Brad Smith
118+
| brad\@comstyle.com (email), brad (Phabricator), brad0 (GitHub)
119+
120+
121+
Driver parts not covered by someone else
122+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123+
| Fangrui Song
124+
| maskray\@google.com (email), MaskRay (Phabricator), MaskRay (GitHub)
125+
126+
127+
Tools
128+
-----
129+
These code owners are responsible for user-facing tools under the Clang
130+
umbrella or components used to support such tools.
131+
132+
Tooling library
133+
~~~~~~~~~~~~~~~
134+
| Manuel Klimek
135+
| klimek\@google.com (email), klimek (Phabricator), r4nt (GitHub)
136+
137+
138+
clang-format
139+
~~~~~~~~~~~~
140+
| MyDeveloperDay
141+
| mydeveloperday\@gmail.com (email), MyDeveloperDay (Phabricator), MyDeveloperDay (GitHub)
142+
143+
| Owen Pan
144+
| owenpiano\@gmail.com (email), owenpan (Phabricator), owenca (GitHub)
145+
146+
147+
ABIs
148+
----
149+
The following people are responsible for decisions involving ABI.
150+
151+
Itanium ABI
152+
~~~~~~~~~~~
153+
| John McCall
154+
| rjmccall\@apple.com (email), rjmccall (Phabricator), rjmccall (GitHub)
155+
156+
157+
Microsoft ABI
158+
~~~~~~~~~~~~~
159+
| Reid Kleckner
160+
| rnk\@google.com (email), rnk (Phabricator), rnk (GitHub)
161+
162+
163+
ARM EABI
164+
~~~~~~~~
165+
| Anton Korobeynikov
166+
| anton\@korobeynikov.info (email), asl (Phabricator), asl (GitHub)
167+
168+
169+
Compiler-Wide Topics
170+
--------------------
171+
The following people are responsible for functionality that does not fit into
172+
a single part of the compiler, but instead span multiple components within the
173+
compiler.
174+
175+
Attributes
176+
~~~~~~~~~~
177+
| Erich Keane
178+
| erich.keane\@intel.com (email), ErichKeane (Phabricator), erichkeane (GitHub)
179+
180+
181+
Inline assembly
182+
~~~~~~~~~~~~~~~
183+
| Eric Christopher
184+
| echristo\@gmail.com (email), echristo (Phabricator), echristo (GitHub)
185+
186+
187+
Text encodings
188+
~~~~~~~~~~~~~~
189+
| Tom Honermann
190+
| tom\@honermann.net (email), tahonermann (Phabricator), tahonermann (GitHub)
191+
192+
| Corentin Jabot
193+
| corentin.jabot\@gmail.com (email), cor3ntin (Phabricator), cor3ntin (GitHub)
194+
195+
196+
CMake integration
197+
~~~~~~~~~~~~~~~~~
198+
| Petr Hosek
199+
| phosek\@google.com (email), phosek (Phabricator), petrhosek (GitHub)
200+
201+
| John Ericson
202+
| git\@johnericson.me (email), Ericson2314 (Phabricator), Ericson2314 (GitHub)
203+
204+
205+
General Windows support
206+
~~~~~~~~~~~~~~~~~~~~~~~
207+
| Reid Kleckner
208+
| rnk\@google.com (email), rnk (Phabricator), rnk (GitHub)
209+
210+
211+
Incremental compilation, REPLs, clang-repl
212+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213+
| Vassil Vassilev
214+
| Vassil.Vassilev\@cern.ch (email), v.g.vassilev (Phabricator), vgvassilev (GitHub)
215+
216+
217+
Standards Conformance
218+
---------------------
219+
The following people are responsible for validating that changes are conforming
220+
to a relevant standard. Contact them for questions about how to interpret a
221+
standard, when fixing standards bugs, or when implementing a new standard feature.
222+
223+
C conformance
224+
~~~~~~~~~~~~~
225+
| Aaron Ballman
226+
| aaron\@aaronballman.com (email), aaron.ballman (Phabricator), AaronBallman (GitHub)
227+
228+
229+
C++ conformance
230+
~~~~~~~~~~~~~~~
231+
| Hubert Tong
232+
| hubert.reinterpretcast\@gmail.com (email), hubert.reinterpretcast (Phabricator), hubert-reinterpretcast (GitHub)
233+
234+
235+
Objective-C/C++ conformance
236+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
237+
| John McCall
238+
| rjmccall\@apple.com (email), rjmccall (Phabricator), rjmccall (GitHub)
239+
240+
241+
OpenMP conformance
242+
~~~~~~~~~~~~~~~~~~
243+
| Alexey Bataev
244+
| a.bataev\@hotmail.com (email), ABataev (Phabricator), alexey-bataev (GitHub)
245+
246+
247+
OpenCL conformance
248+
~~~~~~~~~~~~~~~~~~
249+
| Anastasia Stulova
250+
| anastasia\@compiler-experts.com (email), Anastasia (Phabricator), AnastasiaStulova (GitHub)
251+
252+
253+
SYCL conformance
254+
~~~~~~~~~~~~~~~~
255+
| Alexey Bader
256+
| alexey.bader\@intel.com (email), bader (Phabricator), bader (GitHub)
257+
258+
259+
Former Code Owners
260+
==================
261+
The following people have graciously spent time performing code ownership
262+
responsibilities but are no longer active in that role. Thank you for all your
263+
help with the success of the project!
264+
265+
Emeritus owners
266+
---------------
267+
| Doug Gregor (dgregor\@apple.com)
268+
| Richard Smith (richard\@metafoo.co.uk)
269+
270+
271+
Former component owners
272+
-----------------------
273+
| Chandler Carruth (chandlerc\@gmail.com, chandlerc\@google.com) -- CMake, library layering
274+
| Devin Coughlin (dcoughlin\@apple.com) -- Clang static analyzer

0 commit comments

Comments
 (0)