Skip to content

Commit 3cfd993

Browse files
AndreasLokkokris-jusiak
authored andcommitted
Fix: Ensure Command Line Arguments Are Respected in Clang Compilation
Resolved an issue where command line arguments were ignored, specifically when the program was compiled with Clang. The problem was addressed by correctly assigning the priority in __attribute__((constructor(101))), ensuring proper initialization and consistent behavior across compilation environments."
1 parent b6c6718 commit 3cfd993

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/ut.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3312,7 +3312,7 @@ using operators::operator>>;
33123312

33133313
#if (defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER)) && \
33143314
!defined(__EMSCRIPTEN__)
3315-
__attribute__((constructor)) inline void cmd_line_args(int argc,
3315+
__attribute__((constructor(101))) inline void cmd_line_args(int argc,
33163316
const char* argv[]) {
33173317
::boost::ut::detail::cfg::largc = argc;
33183318
::boost::ut::detail::cfg::largv = argv;

0 commit comments

Comments
 (0)