Skip to content

Conversation

@vvereschaka
Copy link
Contributor

@vvereschaka vvereschaka commented Nov 14, 2025

Added new optional arguments:

  • compiler_flags - common flags for C and C++ compilers.
  • linker_flags - common linker flags for all exe/module/shared configurations.
  • src_dir - source dir for the test suite source code (within prop:buildir).
  • obj_dir - build dir for the test suite (within prop:buildir).

Added new output properties:

  • ts_srcdir
  • ts_objdir

The 'compiler_flags' argument extends or adds the following CMake configuration parameters to the appropriate step: CMAKE_C_FLAGS and CMAKE_CXX_FLAGS. The 'linker_flags' argument extends or adds the following CMake configuration parameters accordingly: CMAKE_EXE_LINKER_FLAGS, CMAKE_MODULE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS.

Added new optional arguments:
* compiler_flags - common flags for C and C++ compilers.
* linker_flags - common linker flags for all exe/module/shared configurations.
* src_dir - source dir for the test suite source code (within prop:buildir).
* obj_dir - build dir for the test suite (within prop:buildir).

Added new output properties:
* ts_srcdir
* ts_objdir
@vvereschaka vvereschaka self-assigned this Nov 14, 2025
@vvereschaka vvereschaka marked this pull request as ready for review November 26, 2025 05:25
cxx_flags = compiler_flags
if "CMAKE_C_FLAGS" in cmake_definitions:
c_flags = util.Interpolate("%(kw:c_flags)s %(kw:flags)s",
c_flags = cflags, flags = cmake_definitions["CMAKE_C_FLAGS"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cflags seems undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, thank you. I'll update accordingly.


path_suffix = src_dir or "llvm-test-suite")
test_suite_obj_dir = util.Interpolate("%(prop:builddir)s/%(kw:path_suffix)s",
path_suffix = obj_dir or util.Interpolate("%(prop:objdir:-build)s/llvm-test-suite"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What %(prop:objdir:-build)s means?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means - use a value of the 'objdir' property or the "build" string instead if 'objdir' is not defined. I.e. "build" is default value there.

Copy link
Contributor

@slydiman slydiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants