Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions README/README.CXXMODULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ different. There are several differences which can be noticed:
specific location. This way we 'mount' `/usr/include/module.modulemap`
non-invasively. The reasons why we need to extend the C++ modules support
beyond ROOT is described bellow.
* rootcling -cxxmodule creates a single artifact *Name.pcm* after the library
* rootcling --cxxmodule creates a single artifact *Name.pcm* after the library
name. At a final stage, ROOT might be able to integrate the Name.pcm with the
shared library itself.
* Improved correctness in number of cases -- in a few cases ROOT is more
Expand Down Expand Up @@ -347,7 +347,7 @@ different. There are several differences which can be noticed:
This command concatenates `header.h` twice before compiling it to make sure
it has proper include protectors.
* Enable it in `rootcling` -- rootcling can produce a C++ Modules-aware
dictionary when it is invoked with `-cxxmodule` flag.
dictionary when it is invoked with `--cxxmodule` flag.
* Modularization of external dependencies -- if a header file is not explicitly
nominated as part of a module and it is transitively included in two modules,
both modules contain that header file content. In other words, the header is
Expand Down
2 changes: 1 addition & 1 deletion bindings/pyroot/cppyy/cppyy/doc/source/utilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ With ``genreflex``, the mapping file can be automatically created with
``--rootmap-lib=MyClassDict``, where "MyClassDict" is the name of the shared
library (without the extension) build from the dictionary file.
With ``rootcling``, create the same mapping file with
``-rmf MyClassDict.rootmap -rml MyClassDict``.
``--rmf MyClassDict.rootmap --rml MyClassDict``.
It is necessary to provide the final library name explicitly, since it is
only in the separate linking step where these names are fixed and those names
may not match the default choice.
Expand Down
2 changes: 1 addition & 1 deletion bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import glob, os, sys, subprocess

Check failure on line 1 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 1 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E401)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:1:1: E401 Multiple imports on one line

USES_PYTHON_CAPI = set(('pythonizables',))

Expand All @@ -12,8 +12,8 @@
sys.exit(res)
sys.exit(0)
else:
if fn[-4:] == '.cxx': fn = fn[:-4]

Check failure on line 15 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E701)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:15:25: E701 Multiple statements on one line (colon)
elif fn[-2:] == '.h': fn = fn[:-2]

Check failure on line 16 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E701)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:16:25: E701 Multiple statements on one line (colon)
if not os.path.exists(fn+'.h'):
print("file %s.h does not exist" % (fn,))
sys.exit(1)
Expand All @@ -24,7 +24,7 @@

if os.path.exists(fn+'Dict.dll'):
dct_time = os.stat(fn+'Dict.dll').st_mtime
if not '-f' in sys.argv:

Check failure on line 27 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E713)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:27:12: E713 Test for membership should be `not in`
mustbuild = False
for ext in ['.h', '.cxx', '.xml']:
if os.stat(fn+ext).st_mtime > dct_time:
Expand Down Expand Up @@ -63,11 +63,11 @@
linkdef.write("#pragma link C++ defined_in %s.h;\n" % fn)
linkdef.write("\n#endif")

DICTIONARY_CMD = "python -m cppyy_backend._rootcling -f {fn}_rflx.cxx -rmf {fn}Dict.rootmap -rml {fn}Dict.dll {fn}.h {fn}Linkdef.h".format(fn=fn)
DICTIONARY_CMD = "python -m cppyy_backend._rootcling -f {fn}_rflx.cxx --rmf {fn}Dict.rootmap --rml {fn}Dict.dll {fn}.h {fn}Linkdef.h".format(fn=fn)
if os.system(DICTIONARY_CMD):
sys.exit(1)

import platform

Check failure on line 70 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:70:1: I001 Import block is un-sorted or un-formatted

Check failure on line 70 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E402)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:70:1: E402 Module level import not at top of file
if '64' in platform.architecture()[0]:
PLATFORMFLAG = '-D_AMD64_'
MACHINETYPE = 'X64'
Expand All @@ -86,7 +86,7 @@
if os.system(BUILDOBJ_CMD):
sys.exit(1)

import cppyy_backend

Check failure on line 89 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:89:8: F401 `cppyy_backend` imported but unused

Check failure on line 89 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:89:1: I001 Import block is un-sorted or un-formatted

Check failure on line 89 in bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E402)

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py:89:1: E402 Module level import not at top of file
CREATEDEF_CMD = "python bindexplib.py {fn} {fn}Dict".format(fn=fn)
if os.system(CREATEDEF_CMD):
sys.exit(1)
Expand Down
14 changes: 7 additions & 7 deletions cmake/modules/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_rdict.pcm)
if(ARG_MODULE)
if(ARG_MULTIDICT)
set(newargs ${newargs} -multiDict)
set(newargs ${newargs} --multiDict)
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_${dictionary}_rdict.pcm)
set(rootmap_name ${library_output_dir}/${libprefix}${library_output_name}32.rootmap)
else()
Expand Down Expand Up @@ -595,7 +595,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
set(rootmap_name)
set(rootmapargs)
else()
set(rootmapargs -rml ${library_name} -rmf ${rootmap_name})
set(rootmapargs --rml ${library_name} --rmf ${rootmap_name})
endif()

#---Get the library and module dependencies-----------------
Expand All @@ -621,7 +621,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
endif()

if(cpp_module_file)
set(newargs -cxxmodule ${newargs})
set(newargs --cxxmodule ${newargs})
endif()

#---what rootcling command to use--------------------------
Expand All @@ -632,9 +632,9 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
else()
if(CMAKE_PROJECT_NAME STREQUAL ROOT)
if(MSVC AND CMAKE_ROOTTEST_DICT)
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe -rootbuild)
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe --rootbuild)
else()
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> -rootbuild)
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> --rootbuild)
# Modules need RConfigure.h copied into include/.
set(ROOTCLINGDEP rootcling rconfigure)
endif()
Expand All @@ -648,7 +648,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
#---build the path exclusion switches----------------------
set(excludepathsargs "")
foreach(excludepath ${excludepaths})
set(excludepathsargs ${excludepathsargs} -excludePath ${excludepath})
set(excludepathsargs ${excludepathsargs} --excludePath ${excludepath})
endforeach()

#---build the implicit dependencies arguments
Expand Down Expand Up @@ -686,7 +686,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)

set(compIncPaths)
foreach(implinc IN LISTS CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
list(APPEND compIncPaths "-compilerI${implinc}")
list(APPEND compIncPaths "--compilerI${implinc}")
endforeach()

if(cpp_module_file AND TARGET ${ARG_MODULE})
Expand Down
2 changes: 1 addition & 1 deletion config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ rmfName = $(dir $1)$(subst .$(SOEXT),.rootmap,$(notdir $1))
# generate the rootmap file
# $(call rootmapModule, TREELIB)
# the argument is the upper case name of the library (see the Module.mk)
rootmapModule = -rml $(notdir $1) -rmf $(call rmfName, $1)
rootmapModule = --rml $(notdir $1) --rmf $(call rmfName, $1)

# This macro returns the argument to be passed to rootcling to
# properly setup the pcm
Expand Down
10 changes: 5 additions & 5 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ target_compile_definitions(Core PRIVATE
)

if (runtime_cxxmodules)
list(APPEND core_implicit_modules "-mSystemByproducts")
list(APPEND core_implicit_modules "--mSystemByproducts")
# Force generation of _Builtin_intrinsics from Core.
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "-mByproduct" "_Builtin_intrinsics")
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_C")
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Rtypes")
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "--mByproduct" "_Builtin_intrinsics")
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Foundation_C")
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Rtypes")
endif(runtime_cxxmodules)

get_target_property(CORE_DICT_HEADERS Core DICT_HEADERS)
Expand Down
6 changes: 3 additions & 3 deletions core/base/src/TSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3557,7 +3557,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
rcling.Append(dict).Append("\" ");

if (produceRootmap && !useCxxModules) {
rcling += " -rml " + libname + " -rmf \"" + libmapfilename + "\" ";
rcling += " --rml " + libname + " --rmf \"" + libmapfilename + "\" ";
rcling.Append("-DR__ACLIC_ROOTMAP ");
}
rcling.Append(GetIncludePath()).Append(" -D__ACLIC__ ");
Expand All @@ -3575,7 +3575,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
// Create a modulemap
// FIXME: Merge the modulemap generation from cmake and here in rootcling.
if (useCxxModules && produceRootmap) {
rcling += " -cxxmodule ";
rcling += " --cxxmodule ";
// TString moduleMapFileName = file_dirname + "/" + libname + ".modulemap";
TString moduleName = libname + "_ACLiC_dict";
if (moduleName.BeginsWith("lib"))
Expand All @@ -3596,7 +3596,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
moduleMapFile << "}" << std::endl;
moduleMapFile.close();
gInterpreter->RegisterPrebuiltModulePath(build_loc.Data(), moduleMapName.Data());
rcling.Append(" \"-moduleMapFile=" + moduleMapFullPath + "\" ");
rcling.Append(" \"--moduleMapFile=" + moduleMapFullPath + "\" ");
}

rcling.Append(" \"").Append(filename_fullpath).Append("\" ");
Expand Down
1 change: 1 addition & 0 deletions core/dictgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ target_include_directories(Dictgen PRIVATE
${CMAKE_SOURCE_DIR}/core/meta/inc
${CMAKE_SOURCE_DIR}/core/foundation/inc
${CMAKE_BINARY_DIR}/ginclude
${CMAKE_SOURCE_DIR}/main/src
${CLING_INCLUDE_DIRS}
)

Expand Down
12 changes: 6 additions & 6 deletions core/dictgen/src/rootcling-argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ def get_argparse():
will not include any of the declarations already included in the
pcm files loaded via -m. There can be more than one -m
""")
parser.add_argument('-rmf', help="""Rootmap file name
parser.add_argument('--rmf', help="""Rootmap file name
Name of the rootmap file. In order to be picked up by ROOT it must
have .rootmap extension
""")
parser.add_argument('-rml', help="""Rootmap library name
parser.add_argument('--rml', help="""Rootmap library name
Specify the name of the library which contains the autoload keys. This
switch can be specified multiple times to autoload several libraries in
presence of a particular key
Expand All @@ -124,17 +124,17 @@ def get_argparse():
3) If this is specified in conjunction with --multiDict, the output is
libTARGETLIBRARY_DICTIONARY_rdict.pcm
""")
parser.add_argument('-multiDict', help="""Enable support for multiple pcms in one library
parser.add_argument('--multiDict', help="""Enable support for multiple pcms in one library
Needs the -s flag. See its documentation.
""")
parser.add_argument('-inlineInputHeader', help="""Add the argument header to the code of the dictionary
parser.add_argument('--inlineInputHeader', help="""Add the argument header to the code of the dictionary
This allows the header to be inlined within the dictionary
""")
parser.add_argument('-interpreteronly', help='No IO information in the dictionary\n')
parser.add_argument('--interpreteronly', help='No IO information in the dictionary\n')
parser.add_argument('-noIncludePaths', help="""Do not store the headers' directories in the dictionary
Instead, rely on the environment variable $ROOT_INCLUDE_PATH at runtime
""")
parser.add_argument('-excludePath', help="""Specify a path to be excluded from the include paths
parser.add_argument('--excludePath', help="""Specify a path to be excluded from the include paths
specified for building this dictionary
""")
parser.add_argument('--lib-list-prefix', help="""Specify libraries needed by the header files parsed
Expand Down
Loading
Loading