diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit/dummy-frontend.cc index f440fce75259f..54a59cffd6de3 100644 --- a/gcc/jit/dummy-frontend.cc +++ b/gcc/jit/dummy-frontend.cc @@ -2029,6 +2029,30 @@ jit_langhook_type_promotes_to (tree type) return type; } +static unsigned int +jit_langhook_option_lang_mask (void) +{ + return CL_LibGCCJIT; +} + +#undef LANG_HOOKS_OPTION_LANG_MASK +#define LANG_HOOKS_OPTION_LANG_MASK jit_langhook_option_lang_mask + +static bool +jit_langhook_handle_option ( + size_t code ATTRIBUTE_UNUSED, + const char *arg ATTRIBUTE_UNUSED, + HOST_WIDE_INT value ATTRIBUTE_UNUSED, + int kind ATTRIBUTE_UNUSED, + location_t loc ATTRIBUTE_UNUSED, + const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED) +{ + return true; +} + +#undef LANG_HOOKS_HANDLE_OPTION +#define LANG_HOOKS_HANDLE_OPTION jit_langhook_handle_option + #undef LANG_HOOKS_EH_PERSONALITY #define LANG_HOOKS_EH_PERSONALITY jit_langhook_eh_personality diff --git a/gcc/jit/lang.opt b/gcc/jit/lang.opt new file mode 100644 index 0000000000000..2c88d93fa4cc6 --- /dev/null +++ b/gcc/jit/lang.opt @@ -0,0 +1,53 @@ +; Options for libgccjit. +; Copyright (C) 2026 Free Software Foundation, Inc. +; +; This file is part of GCC. +; +; GCC is free software; you can redistribute it and/or modify it under +; the terms of the GNU General Public License as published by the Free +; Software Foundation; either version 3, or (at your option) any later +; version. +; +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY +; WARRANTY; without even the implied warranty of MERCHANTABILITY or +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +; for more details. +; +; You should have received a copy of the GNU General Public License +; along with GCC; see the file COPYING3. If not see +; . + +; See the GCC internals manual for a description of this file's format. + +; Please try to keep this file in ASCII collating order. + +Language +LibGCCJIT + +Wif-not-aligned +LibGCCJIT +; Documented in C + +Wpsabi +LibGCCJIT +; Documented in C + +Wstringop-overflow= +LibGCCJIT +; Documented in C + +Wstringop-overread +LibGCCJIT +; Documented in C + +Wstringop-truncation +LibGCCJIT +; Documented in C + +Wsync-nand +LibGCCJIT +; Documented in C + +Wunused-result +LibGCCJIT +; Documented in C diff --git a/gcc/jit/lang.opt.urls b/gcc/jit/lang.opt.urls new file mode 100644 index 0000000000000..29699573801ce --- /dev/null +++ b/gcc/jit/lang.opt.urls @@ -0,0 +1,22 @@ +; Autogenerated by regenerate-opt-urls.py from gcc/jit/lang.opt and generated HTML + +Wif-not-aligned +UrlSuffix(gcc/Warning-Options.html#index-Wif-not-aligned) + +Wpsabi +UrlSuffix(gcc/Warning-Options.html#index-Wno-psabi) + +Wstringop-overflow= +UrlSuffix(gcc/Warning-Options.html#index-Wno-stringop-overflow) + +Wstringop-overread +UrlSuffix(gcc/Warning-Options.html#index-Wno-stringop-overread) + +Wstringop-truncation +UrlSuffix(gcc/Warning-Options.html#index-Wno-stringop-truncation) + +Wsync-nand +UrlSuffix(gcc/Warning-Options.html#index-Wno-sync-nand) + +Wunused-result +UrlSuffix(gcc/Warning-Options.html#index-Wno-unused-result) diff --git a/gcc/opts.h b/gcc/opts.h index e637963b67376..82655dada6400 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -164,12 +164,12 @@ extern const struct cl_var cl_vars[]; extern const char *const lang_names[]; extern const unsigned int cl_lang_count; -#define CL_PARAMS (1U << 16) /* Fake entry. Used to display --param info with --help. */ -#define CL_WARNING (1U << 17) /* Enables an (optional) warning message. */ -#define CL_OPTIMIZATION (1U << 18) /* Enables an (optional) optimization. */ -#define CL_DRIVER (1U << 19) /* Driver option. */ -#define CL_TARGET (1U << 20) /* Target-specific option. */ -#define CL_COMMON (1U << 21) /* Language-independent. */ +#define CL_PARAMS (1U << 17) /* Fake entry. Used to display --param info with --help. */ +#define CL_WARNING (1U << 18) /* Enables an (optional) warning message. */ +#define CL_OPTIMIZATION (1U << 19) /* Enables an (optional) optimization. */ +#define CL_DRIVER (1U << 20) /* Driver option. */ +#define CL_TARGET (1U << 21) /* Target-specific option. */ +#define CL_COMMON (1U << 22) /* Language-independent. */ #define CL_MIN_OPTION_CLASS CL_PARAMS #define CL_MAX_OPTION_CLASS CL_COMMON @@ -179,11 +179,11 @@ extern const unsigned int cl_lang_count; This distinction is important because --help will not list options which only have these higher bits set. */ -#define CL_JOINED (1U << 22) /* If takes joined argument. */ -#define CL_SEPARATE (1U << 23) /* If takes a separate argument. */ -#define CL_UNDOCUMENTED (1U << 24) /* Do not output with --help. */ -#define CL_NO_DWARF_RECORD (1U << 25) /* Do not add to producer string. */ -#define CL_PCH_IGNORE (1U << 26) /* Do compare state for pch. */ +#define CL_JOINED (1U << 23) /* If takes joined argument. */ +#define CL_SEPARATE (1U << 24) /* If takes a separate argument. */ +#define CL_UNDOCUMENTED (1U << 25) /* Do not output with --help. */ +#define CL_NO_DWARF_RECORD (1U << 26) /* Do not add to producer string. */ +#define CL_PCH_IGNORE (1U << 27) /* Do compare state for pch. */ /* Flags for an enumerated option argument. */ #define CL_ENUM_CANONICAL (1 << 0) /* Canonical for this value. */