You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMHO, a few options defined in CTool don't apply to linking and should only be available for CBuilder.
sources: The name suggests compilation from some kind of source file. Also, relative paths are resolved relative to the HookConfig.packageRoot. So conceptionally this options is for source files in the package and should be in CBuilder. Object files can be passed to compilers and linkers, so it would make sense to have a new option objects in CTool that is resolved relative to HookConfig.buildDirectory for relative files (it seems more likely that users want to link some object file that was just built by the hook than shipping precompiled object files in the package). To link in whole static libraries CTool.libraries ([native_toolchain_c] Add libraries and libraryDirectories options to CTool #1423) feels pretty intuitive.
includes: Include directives are specific to source file compilation.
flags: It's confusing that you can pass flags to the linker through this option as well as CLinker.linkerOptions. For CBuilder it makes sense to have flags and linkerOptions because we need to distinguish between compiler and linker flags (especially for MSVC where linker flags and only linker flags must follow /link). So linkerOptions should eventually be in CTool.
defines: Also a source file compilation-specific thing.
std: Sets the language standard to use for source file compilation, so does not apply to linking.
optimizationLevel: Sets the optimization level to compile source files with, so does not apply to linking.
The text was updated successfully, but these errors were encountered:
IMHO, a few options defined in
CTool
don't apply to linking and should only be available forCBuilder
.sources
: The name suggests compilation from some kind of source file. Also, relative paths are resolved relative to theHookConfig.packageRoot
. So conceptionally this options is for source files in the package and should be inCBuilder
. Object files can be passed to compilers and linkers, so it would make sense to have a new optionobjects
inCTool
that is resolved relative toHookConfig.buildDirectory
for relative files (it seems more likely that users want to link some object file that was just built by the hook than shipping precompiled object files in the package). To link in whole static librariesCTool.libraries
([native_toolchain_c] Addlibraries
andlibraryDirectories
options toCTool
#1423) feels pretty intuitive.includes
: Include directives are specific to source file compilation.flags
: It's confusing that you can pass flags to the linker through this option as well asCLinker.linkerOptions
. ForCBuilder
it makes sense to haveflags
andlinkerOptions
because we need to distinguish between compiler and linker flags (especially for MSVC where linker flags and only linker flags must follow/link
). SolinkerOptions
should eventually be inCTool
.defines
: Also a source file compilation-specific thing.std
: Sets the language standard to use for source file compilation, so does not apply to linking.optimizationLevel
: Sets the optimization level to compile source files with, so does not apply to linking.The text was updated successfully, but these errors were encountered: