Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0b8f3aa
Build and upload artifact on GitHub Actions
antoyo May 31, 2021
131a03b
Distribute version without 128-bit integers
antoyo Feb 16, 2024
b271b10
Add support for packed struct
antoyo Mar 29, 2022
e809a25
Add support for try/catch
antoyo Oct 15, 2022
5b130a3
Fix bug related to the personality function
antoyo Apr 16, 2023
cdb55da
Make new_array_type take unsigned long
antoyo Mar 4, 2023
95c5246
Add ability to get CPU features
antoyo Jun 26, 2023
9a4805e
Fix get_size of size_t
antoyo Nov 3, 2023
91a2747
libgccjit: Do not treat warnings as errors
antoyo Feb 12, 2024
8eeac3e
feat(gccjit): Allow set_loccation to various classes
tempdragon Feb 18, 2024
ec135b6
Add _Float16, _Float32, _Float64 and __float128 support for jit
Apr 3, 2024
f7828fb
Target Info extended with supported target dependent types
Apr 18, 2024
168f20a
Add git_jit_type_is_floating_point() function
Apr 22, 2024
f727abb
Some fixes and workaround for aarch64
antoyo Apr 24, 2024
6ad633a
Make is_same_type_as() supporting floating point types. Improve type …
Apr 29, 2024
1c02d40
libgccjit: Add support for Aarch64 CPU features
antoyo Apr 26, 2024
f7274c6
Fix is_same_type_as for vector type
Jun 21, 2024
0aade01
Add `gcc_jit_rvalue_set_type`
GuillaumeGomez Apr 21, 2024
8dddad4
Add support for the weak variable attribute
antoyo Sep 1, 2024
f4d1419
Handle missing types in jit_langhook_type_for_mode
antoyo Oct 8, 2024
34c97fb
Fix licenses
GuillaumeGomez Jul 22, 2024
9ce5fab
jit: Fix volatile loads and stores
YakoYakoYokuYoku Jan 3, 2024
1892d24
libgccjit: Allow sending a const pointer as argument
antoyo May 24, 2022
8d9e1fe
Remove wrong void type for sized floating-point types in tree_type_to…
antoyo Nov 26, 2024
3f7912f
libgccjit: Allow casts between integers and pointers
antoyo Dec 10, 2024
6284975
libgccjit: Fix infinite recursion in gt_ggc_mx_lang_tree_node
antoyo Jan 15, 2025
e8ce1fd
libgccjit: Fix for -fanalyzer used in libgccjit
antoyo Mar 25, 2024
d7a5243
libgccjit: Add the function attributes for setting the ABI
antoyo Feb 12, 2025
88d60b6
libgccjit: Add support for the x87 CPU feature
antoyo Feb 14, 2025
d755748
Use rust-lang mirror for downloading GCC dependencies
Kobzol Mar 19, 2025
3e3878e
Fix get_size for long double
antoyo Mar 27, 2025
9244ae6
libgccjit: Don't abort on fatal errors
antoyo Jun 15, 2025
3aada9d
Fix compilation on Aarch64
antoyo Jul 1, 2025
4aaeca6
Added support for creating constant Rvalues backed by different intig…
FractalFir Jul 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

permissions:
contents: write

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
version:
- { use_patch: true, asset_name: "gcc-15-without-int128.deb" }
- { use_path: false, asset_name: "gcc-15.deb" }

steps:
- uses: actions/checkout@v2

- name: Install mpfr
run: sudo apt-get install gcc-10 libmpfr-dev libmpc-dev

- name: Apply patch to disable 128-bit integers
if: matrix.version.use_patch
run: git apply patches/0001-Disable-128-bit-integers-for-testing-purposes.patch

- name: Build libgccjit
run: |
cd ..
ls
mkdir build install
cd build
../gcc/configure --enable-host-shared --enable-languages=c,jit,lto --disable-bootstrap --disable-multilib --prefix=$(pwd)/../install/usr --libdir=$(pwd)/../install/usr/lib --libexecdir=$(pwd)/../install/usr/lib
make -j4
make install

- name: Build Debian package
run: |
cd ..
mkdir install/DEBIAN
cat > install/DEBIAN/control << EOF
Package: gcc-15
Version: 15
Architecture: amd64
Maintainer: Antoni Boucher <[email protected]>
Description: gcc 15 for rustc_codegen_gcc CI
EOF
dpkg-deb --root-owner-group --build install
mv install.deb gcc-15.deb

- name: Compute tag name
id: tag_name
run: |
git_hash=$(git rev-parse "$GITHUB_SHA")
echo "TAG_NAME=$git_hash" >> $GITHUB_OUTPUT

- name: Create tag
if: github.ref == 'refs/heads/master'
continue-on-error: true
uses: laputansoft/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}

- name: Create release
if: github.ref == 'refs/heads/master' && !matrix.version.use_patch
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/gcc/install/usr/lib/libgccjit.so.0.0.1
asset_name: libgccjit.so
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}

- name: Create release
if: github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/gcc/gcc-15.deb
asset_name: ${{ matrix.version.asset_name }}
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}
6 changes: 5 additions & 1 deletion contrib/download_prerequisites
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ mpc='mpc-1.2.1.tar.gz'
isl='isl-0.24.tar.bz2'
gettext='gettext-0.22.tar.gz'

base_url='http://gcc.gnu.org/pub/gcc/infrastructure/'
#base_url='http://gcc.gnu.org/pub/gcc/infrastructure/'
# We use rust-lang mirrors because the GCC infrastructure is unreliable.
# When dependencies are changed, we have to modify our mirrors.
# Please contact t-infra for that.
base_url='https://ci-mirrors.rust-lang.org/rustc/gcc/'

echo_archives() {
echo "${gettext}"
Expand Down
36 changes: 33 additions & 3 deletions gcc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ tm_d_file_list=@tm_d_file_list@
tm_d_include_list=@tm_d_include_list@
tm_rust_file_list=@tm_rust_file_list@
tm_rust_include_list=@tm_rust_include_list@
tm_jit_file_list=@tm_jit_file_list@
tm_jit_include_list=@tm_jit_include_list@
build_xm_file_list=@build_xm_file_list@
build_xm_include_list=@build_xm_include_list@
build_xm_defines=@build_xm_defines@
Expand Down Expand Up @@ -919,6 +921,7 @@ TCONFIG_H = tconfig.h $(xm_file_list)
TM_P_H = tm_p.h $(tm_p_file_list) $(TREE_H)
TM_D_H = tm_d.h $(tm_d_file_list)
TM_RUST_H = tm_rust.h $(tm_rust_file_list)
TM_JIT_H = tm_jit.h $(tm_jit_file_list)
GTM_H = tm.h $(tm_file_list) insn-constants.h
TM_H = $(GTM_H) insn-flags.h $(OPTIONS_H)

Expand Down Expand Up @@ -978,11 +981,13 @@ C_TARGET_DEF = c-family/c-target.def target-hooks-macros.h
COMMON_TARGET_DEF = common/common-target.def target-hooks-macros.h
D_TARGET_DEF = d/d-target.def target-hooks-macros.h
RUST_TARGET_DEF = rust/rust-target.def target-hooks-macros.h
JIT_TARGET_DEF = jit/jit-target.def target-hooks-macros.h
TARGET_H = $(TM_H) target.h $(TARGET_DEF) insn-modes.h insn-codes.h
C_TARGET_H = c-family/c-target.h $(C_TARGET_DEF)
COMMON_TARGET_H = common/common-target.h $(INPUT_H) $(COMMON_TARGET_DEF)
D_TARGET_H = d/d-target.h $(D_TARGET_DEF)
RUST_TARGET_H = rust/rust-target.h $(RUST_TARGET_DEF)
JIT_TARGET_H = jit/jit-target.h $(JIT_TARGET_DEF)
MACHMODE_H = machmode.h mode-classes.def
HOOKS_H = hooks.h
HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H)
Expand Down Expand Up @@ -1297,6 +1302,9 @@ CXX_TARGET_OBJS=@cxx_target_objs@
# Target specific, D specific object file
D_TARGET_OBJS=@d_target_objs@

# Target specific, JIT specific object file
JIT_TARGET_OBJS=@jit_target_objs@

# Target specific, Fortran specific object file
FORTRAN_TARGET_OBJS=@fortran_target_objs@

Expand Down Expand Up @@ -2085,6 +2093,7 @@ tm.h: cs-tm.h ; @true
tm_p.h: cs-tm_p.h ; @true
tm_d.h: cs-tm_d.h ; @true
tm_rust.h: cs-tm_rust.h ; @true
tm_jit.h: cs-tm_jit.h ; @true

cs-config.h: Makefile
TARGET_CPU_DEFAULT="" \
Expand Down Expand Up @@ -2124,6 +2133,11 @@ cs-tm_rust.h: Makefile
HEADERS="$(tm_rust_include_list)" DEFINES="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_rust.h

cs-tm_jit.h: Makefile
TARGET_CPU_DEFAULT="" \
HEADERS="$(tm_jit_include_list)" DEFINES="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_jit.h

# Don't automatically run autoconf, since configure.ac might be accidentally
# newer than configure. Also, this writes into the source directory which
# might be on a read-only file system. If configured for maintainer mode
Expand Down Expand Up @@ -2591,6 +2605,12 @@ default-d.o: config/default-d.cc
$(COMPILE) $<
$(POSTCOMPILE)

# Files used by the JIT language front end.

default-jit.o: config/default-jit.cc
$(COMPILE) $<
$(POSTCOMPILE)

# Files used by the Rust language front end.

default-rust.o: config/default-rust.cc
Expand Down Expand Up @@ -2943,6 +2963,15 @@ s-rust-target-hooks-def-h: build/genhooks$(build_exeext)
rust/rust-target-hooks-def.h
$(STAMP) s-rust-target-hooks-def-h

jit/jit-target-hooks-def.h: s-jit-target-hooks-def-h; @true

s-jit-target-hooks-def-h: build/genhooks$(build_exeext)
$(RUN_GEN) build/genhooks$(build_exeext) "JIT Target Hook" \
> tmp-jit-target-hooks-def.h
$(SHELL) $(srcdir)/../move-if-change tmp-jit-target-hooks-def.h \
jit/jit-target-hooks-def.h
$(STAMP) s-jit-target-hooks-def-h

# check if someone mistakenly only changed tm.texi.
# We use a different pathname here to avoid a circular dependency.
s-tm-texi: $(srcdir)/doc/../doc/tm.texi
Expand Down Expand Up @@ -3140,7 +3169,7 @@ s-gtype: $(EXTRA_GTYPE_DEPS) build/gengtype$(build_exeext) \
-r gtype.state
$(STAMP) s-gtype

generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \
generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_JIT_H) $(TM_H) multilib.h \
$(simple_generated_h) specs.h \
tree-check.h genrtl.h insn-modes.h insn-modes-inline.h \
tm-preds.h tm-constrs.h \
Expand All @@ -3152,6 +3181,7 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \
c-family/c-target-hooks-def.h d/d-target-hooks-def.h \
$(TM_RUST_H) rust/rust-target-hooks-def.h \
case-cfn-macros.h \
jit/jit-target-hooks-def.h case-cfn-macros.h \
cfn-operators.pd omp-device-properties.h

#
Expand Down Expand Up @@ -3285,8 +3315,8 @@ build/genrecog.o : genrecog.cc $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) \
$(HASH_TABLE_H) inchash.h
build/genhooks.o : genhooks.cc $(TARGET_DEF) $(C_TARGET_DEF) \
$(COMMON_TARGET_DEF) $(D_TARGET_DEF) $(RUST_TARGET_DEF) $(BCONFIG_H) \
$(SYSTEM_H) errors.h
$(COMMON_TARGET_DEF) $(D_TARGET_DEF) $(RUST_TARGET_DEF) $(JIT_TARGET_DEF) \
$(BCONFIG_H) $(SYSTEM_H) errors.h
build/genmddump.o : genmddump.cc $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genmatch.o : genmatch.cc $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
Expand Down
2 changes: 2 additions & 0 deletions gcc/analyzer/checker-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ class inlined_call_event : public checker_event
m_apparent_callee_fndecl (apparent_callee_fndecl),
m_apparent_caller_fndecl (apparent_caller_fndecl)
{
gcc_assert (apparent_callee_fndecl != NULL);
gcc_assert (apparent_caller_fndecl != NULL);
gcc_assert (LOCATION_BLOCK (loc) == NULL);
}

Expand Down
Loading