Skip to content

Instantly share code, notes, and snippets.

@leiless
Created December 22, 2018 02:20
Show Gist options
  • Save leiless/2c26477b00a2847eaf08109518fb008e to your computer and use it in GitHub Desktop.
Save leiless/2c26477b00a2847eaf08109518fb008e to your computer and use it in GitHub Desktop.
HOWTO dump clang predefined macros
$ xcrun --sdk macosx --find clang
/Library/Developer/CommandLineTools/usr/bin/clang

$ /Library/Developer/CommandLineTools/usr/bin/clang -dM -E - < /dev/null
#define OBJC_NEW_PROPERTIES 1
#define _LP64 1
#define __APPLE_CC__ 6000
#define __APPLE__ 1
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_CONSUME 1
#define __ATOMIC_RELAXED 0
#define __ATOMIC_RELEASE 3
#define __ATOMIC_SEQ_CST 5
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment