Skip to content

Commit

Permalink
utils/compiler.h: Define empty __opt_O{0,1,2} if neither clang nor gcc
Browse files Browse the repository at this point in the history
Signed-off-by: Rong Tao <[email protected]>
  • Loading branch information
Rtoax committed Feb 6, 2025
1 parent 9f24512 commit 008abcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
# define __opt_O0 __attribute__((optimize("-O0")))
# define __opt_O1 __attribute__((optimize("-O1")))
# define __opt_O2 __attribute__((optimize("-O2")))
#else
# define __opt_O0
# define __opt_O1
# define __opt_O2
#endif

#ifndef FALLTHROUGH
Expand Down

0 comments on commit 008abcf

Please sign in to comment.