summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-07-22 03:48:10 -0400
committerJeffrey Walton <noloader@gmail.com>2015-07-22 03:48:10 -0400
commit6d0dd41eb0e2275408e6e8edf90af1e1dc3a285c (patch)
tree2d4d53d230f0caf7fd356c224fec7c67f67d54f8 /config.h
parent931ec1722453f03d123cca146379066283f30681 (diff)
downloadcryptopp-git-6d0dd41eb0e2275408e6e8edf90af1e1dc3a285c.tar.gz
Specialized defines to work with/around Clang integrated assembler. The two defines are WORKAROUND_LLVM_BUG_18916 and CRYPTOPP_USING_CLANG_INTEGRATED_ASSEMBLER. Once the 18916 bug is fixed, the other issues around the integrated assembler will remain
Diffstat (limited to 'config.h')
-rw-r--r--config.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/config.h b/config.h
index 41632693..0a6495df 100644
--- a/config.h
+++ b/config.h
@@ -71,7 +71,15 @@
// Define this if you are working around Clang's integrated assembler bug by
// disabling the assembler (https://llvm.org/bugs/show_bug.cgi?id=18916).
-// #define CRYPTOPP_CLANG_NO_INTEGRATED_AS
+// When the LLVM project fixes it, then we turn it on/off automatically.
+#define WORKAROUND_LLVM_BUG_18916
+
+// Define this if you are working with Clang's integrated assembler. As far as we know,
+// the only way to tell is `$(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1`. The
+// integrated assembler will return `clang: error: unsupported argument '-v' option`.
+#if defined(__clang__)
+#define CRYPTOPP_USING_CLANG_INTEGRATED_ASSEMBLER
+#endif
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
// Avoid putting "CryptoPP::" in front of everything in Doxygen output