root
root copied to clipboard
[cling] Add TableGen-based generator for command line arguments
Upstream moved away from manually declaring *def and *inc files. These are now auto-generated with tablegen. This patch does the same for cling, making it easier to rebase and maintain.
This Pull request:
Changes or fixes:
Checklist:
- [x] tested changes locally
- [ ] updated the docs (if necessary)
This PR fixes #
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Tablegen'd file for reference:
dvalapar@emmanouil:~/work/root (dev.cling-tablegen)$ llvm-tblgen-16 -I /home/dvalapar/work/root/interpreter/llvm-project/llvm/include /home/dvalapar/work/root/interpreter/cling/include/cling/Interpreter/ClingOptions.td -gen
-opt-parser-defs
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Option Parsing Definitions *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
/////////
// Prefixes
#ifdef PREFIX
#define COMMA ,
PREFIX(prefix_0, {llvm::StringLiteral("")})
PREFIX(prefix_3, {llvm::StringLiteral("-") COMMA llvm::StringLiteral("")})
PREFIX(prefix_2, {llvm::StringLiteral("-") COMMA llvm::StringLiteral("--") COMMA llvm::StringLiteral("")})
PREFIX(prefix_1, {llvm::StringLiteral("--") COMMA llvm::StringLiteral("")})
#undef COMMA
#endif // PREFIX
/////////
// Prefix Union
#ifdef PREFIX_UNION
#define COMMA ,
PREFIX_UNION({
llvm::StringLiteral("-") COMMA llvm::StringLiteral("--") COMMA llvm::StringLiteral("")})
#undef COMMA
#endif // PREFIX_UNION
/////////
// ValuesCode
#ifdef OPTTABLE_VALUES_CODE
#endif
/////////
// Groups
#ifdef OPTION
//////////
// Options
OPTION(prefix_0, llvm::StringLiteral("<input>"), INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
OPTION(prefix_0, llvm::StringLiteral("<unknown>"), UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
OPTION(prefix_1, llvm::StringLiteral("debug-only="), _debugFlags_EQ, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
OPTION(prefix_1, llvm::StringLiteral("debug-only"), _debugFlags, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
OPTION(prefix_1, llvm::StringLiteral("errorout"), _errorout, Flag, INVALID, INVALID, nullptr, 0, 0,
"Do not recover from input errors", nullptr, nullptr)
OPTION(prefix_2, llvm::StringLiteral("help"), help, Flag, INVALID, INVALID, nullptr, 0, 0,
"Print this help text", nullptr, nullptr)
OPTION(prefix_3, llvm::StringLiteral("L"), L, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
"Add directory to library search path", "<directory>", nullptr)
OPTION(prefix_3, llvm::StringLiteral("l"), l, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0,
"Load a library before prompt", "<library>", nullptr)
OPTION(prefix_1, llvm::StringLiteral("metastr="), _metastr_EQ, Joined, INVALID, INVALID, nullptr, 0, 0,
"Set the meta command tag, default '.'", nullptr, nullptr)
OPTION(prefix_1, llvm::StringLiteral("metastr"), _metastr, Separate, INVALID, INVALID, nullptr, 0, 0,
"Set the meta command tag, default '.'", nullptr, nullptr)
OPTION(prefix_1, llvm::StringLiteral("nologo"), _nologo, Flag, INVALID, INVALID, nullptr, 0, 0,
"Do not show startup-banner", nullptr, nullptr)
OPTION(prefix_2, llvm::StringLiteral("noruntime"), noruntime, Flag, INVALID, INVALID, nullptr, 0, 0,
"Disable runtime support (no null checking, no value printing)", nullptr, nullptr)
OPTION(prefix_1, llvm::StringLiteral("ptrcheck"), _ptrcheck, Flag, INVALID, INVALID, nullptr, 0, 0,
"Enable injection of pointer validity checks", nullptr, nullptr)
OPTION(prefix_2, llvm::StringLiteral("version"), version, Flag, INVALID, INVALID, nullptr, 0, 0,
"Print the compiler version", nullptr, nullptr)
OPTION(prefix_3, llvm::StringLiteral("v"), v, Flag, INVALID, INVALID, nullptr, 0, 0,
"Enable verbose output", nullptr, nullptr)
#endif // OPTION
#ifdef SIMPLE_ENUM_VALUE_TABLE
struct SimpleEnumValue {
const char *Name;
unsigned Value;
};
struct SimpleEnumValueTable {
const SimpleEnumValue *Table;
unsigned Size;
};
static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
#endif // SIMPLE_ENUM_VALUE_TABLE
Build failed on windows10/default. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Test Results
12 files 12 suites 2d 6h 27m 17s :stopwatch: 2 562 tests 2 559 :white_check_mark: 0 :zzz: 3 :x: 28 822 runs 28 819 :white_check_mark: 0 :zzz: 3 :x:
For more details on these failures, see this check.
Results for commit daa486f0.
:recycle: This comment has been updated with latest results.
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Try to change these lines. on Windows, the binaries are in the
$<CONFIG>/bindirectory,$<CONFIG>being only known at build time
Thanks @bellenot
Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
The roottest-root-roofitstats-RooDataSet_ASCII_out_WILL_FAIL failures on Windows are known and will be fixed soon (a PR is there already)
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on windows10/default. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on ROOT-performance-centos8-multicore/soversion. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Failing tests:
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-3.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on ROOT-performance-centos8-multicore/soversion. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Failing tests:
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Build failed on ROOT-performance-centos8-multicore/soversion. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.