Skip to content

Remove attributes declaration duplication #67

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

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7f8534b
Build and upload artifact on GitHub Actions
antoyo May 31, 2021
7410132
Distribute version without 128-bit integers
antoyo Feb 16, 2024
933ebc7
Add support for packed struct
antoyo Mar 29, 2022
ca2ffd0
Add support for try/catch
antoyo Oct 15, 2022
8cba529
Fix bug related to the personality function
antoyo Apr 16, 2023
3b2087e
Make new_array_type take unsigned long
antoyo Mar 4, 2023
81527ca
Add ability to get CPU features
antoyo Jun 26, 2023
de93902
Fix get_size of size_t
antoyo Nov 3, 2023
bc6742b
libgccjit: Do not treat warnings as errors
antoyo Feb 12, 2024
f9ab139
feat(gccjit): Allow set_loccation to various classes
tempdragon Feb 18, 2024
18a6d45
Add _Float16, _Float32, _Float64 and __float128 support for jit
Apr 3, 2024
836e013
Target Info extended with supported target dependent types
Apr 18, 2024
d276404
Add git_jit_type_is_floating_point() function
Apr 22, 2024
c0354a7
Some fixes and workaround for aarch64
antoyo Apr 24, 2024
3f5ca5f
Make is_same_type_as() supporting floating point types. Improve type …
Apr 29, 2024
bd5b099
libgccjit: Add support for Aarch64 CPU features
antoyo Apr 26, 2024
64a0d37
Fix is_same_type_as for vector type
Jun 21, 2024
9392abe
Add `gcc_jit_rvalue_set_type`
GuillaumeGomez Apr 21, 2024
e2fee1f
Add support for the weak variable attribute
antoyo Sep 1, 2024
573ff27
Handle missing types in jit_langhook_type_for_mode
antoyo Oct 8, 2024
25e536c
Fix licenses
GuillaumeGomez Jul 22, 2024
462f730
jit: Fix volatile loads and stores
YakoYakoYokuYoku Jan 3, 2024
9b9d935
libgccjit: Allow sending a const pointer as argument
antoyo May 24, 2022
6bd3fea
Remove wrong void type for sized floating-point types in tree_type_to…
antoyo Nov 26, 2024
0383fa4
libgccjit: Allow casts between integers and pointers
antoyo Dec 10, 2024
96d489b
libgccjit: Fix infinite recursion in gt_ggc_mx_lang_tree_node
antoyo Jan 15, 2025
24fb235
libgccjit: Fix for -fanalyzer used in libgccjit
antoyo Mar 25, 2024
ac2aa8f
libgccjit: Add the function attributes for setting the ABI
antoyo Feb 12, 2025
5e86f3c
libgccjit: Add support for the x87 CPU feature
antoyo Feb 14, 2025
f840792
Use rust-lang mirror for downloading GCC dependencies
Kobzol Mar 19, 2025
0ea98a1
Fix get_size for long double
antoyo Mar 27, 2025
e1b09c5
libgccjit: Remove attributes declaration duplication
GuillaumeGomez Apr 8, 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 @@ -2081,6 +2089,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 @@ -2120,6 +2129,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 @@ -2587,6 +2601,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 @@ -2939,6 +2959,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 @@ -3135,7 +3164,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 @@ -3147,6 +3176,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 @@ -3280,8 +3310,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 @@ -565,6 +565,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