Skip to content

Commit 7d7e2ba

Browse files
committed
Revert "libgccjit: Add option to hide stderr logs [PR104073]"
This reverts commit e1aef53.
1 parent 895db89 commit 7d7e2ba

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed

gcc/jit/docs/topics/contexts.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,6 @@ Boolean options
453453
If true, the :type:`gcc_jit_context` will not clean up intermediate files
454454
written to the filesystem, and will display their location on stderr.
455455

456-
.. macro:: GCC_JIT_BOOL_OPTION_HIDE_LOG_STDERR
457-
458-
If true, libgccjit will not log the errors on stderr.
459-
460456
.. function:: void \
461457
gcc_jit_context_set_bool_allow_unreachable_blocks (gcc_jit_context *ctxt, \
462458
int bool_value)

gcc/jit/jit-recording.cc

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,21 +1571,15 @@ recording::context::add_error_va (location *loc, const char *fmt, va_list ap)
15711571
if (!ctxt_progname)
15721572
ctxt_progname = "libgccjit.so";
15731573

1574-
bool hide_log_stderr =
1575-
get_bool_option (GCC_JIT_BOOL_OPTION_HIDE_LOG_STDERR);
1576-
1577-
if (!hide_log_stderr)
1578-
{
1579-
if (loc)
1580-
fprintf (stderr, "%s: %s: error: %s\n",
1581-
ctxt_progname,
1582-
loc->get_debug_string (),
1583-
errmsg);
1584-
else
1585-
fprintf (stderr, "%s: error: %s\n",
1586-
ctxt_progname,
1587-
errmsg);
1588-
}
1574+
if (loc)
1575+
fprintf (stderr, "%s: %s: error: %s\n",
1576+
ctxt_progname,
1577+
loc->get_debug_string (),
1578+
errmsg);
1579+
else
1580+
fprintf (stderr, "%s: error: %s\n",
1581+
ctxt_progname,
1582+
errmsg);
15891583

15901584
if (!m_error_count)
15911585
{
@@ -1708,7 +1702,6 @@ static const char * const
17081702
"GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING",
17091703
"GCC_JIT_BOOL_OPTION_SELFCHECK_GC",
17101704
"GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES",
1711-
"GCC_JIT_BOOL_OPTION_HIDE_LOG_STDERR",
17121705
};
17131706

17141707
static const char * const

gcc/jit/libgccjit.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@ enum gcc_jit_bool_option
241241
their location on stderr. */
242242
GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES,
243243

244-
/* If true, gcc_jit_context_release will not print the errors to stderr. */
245-
GCC_JIT_BOOL_OPTION_HIDE_LOG_STDERR,
246-
247244
GCC_JIT_NUM_BOOL_OPTIONS
248245
};
249246

0 commit comments

Comments
 (0)