Skip to content

Commit

Permalink
gcc: fix get_completion_scheduler for -Og
Browse files Browse the repository at this point in the history
The get_completion_schedule failed to link with -Og.  There doesn't
appear to be a direct way to detect this with pre-processor flags.
Therefore, switch the detection so that only size-optimization results
in the template type (__OPTIMIZE_SIZE__ instead of __OPTIMIZE__).

Fixes: d5d5cab
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
  • Loading branch information
williamspatrick committed Nov 17, 2023
1 parent 8e1901e commit 6b027bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/stdexec/execution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ namespace stdexec {
inline constexpr get_delegatee_scheduler_t get_delegatee_scheduler{};
inline constexpr get_allocator_t get_allocator{};
inline constexpr get_stop_token_t get_stop_token{};
#if !STDEXEC_GCC() || defined(__OPTIMIZE__)
#if !STDEXEC_GCC() || defined(__OPTIMIZE_SIZE__)
template <__completion_tag _CPO>
inline constexpr get_completion_scheduler_t<_CPO> get_completion_scheduler{};
#else
Expand Down

0 comments on commit 6b027bc

Please sign in to comment.