Skip to content

Commit

Permalink
Add conditional compilation specific to OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Nov 29, 2024
1 parent 8f5e853 commit 70494a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cbits/flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,11 @@ static void process_options(int argc, char *argv[])
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
/* Add 'used' so that the variable is not optimised away. */
#if defined(__APPLE__) && defined(__MACH__)
__attribute__((section("__ACCELERATE_HS,.init_array"), used))
#else
__attribute__((section(".init_array"), used))
#endif
static void *process_options_ctor_entry = &process_options;
#pragma GCC diagnostic pop
#endif

0 comments on commit 70494a8

Please sign in to comment.