diff --git a/Jamfile b/Jamfile index b68cdccd..b999474c 100644 --- a/Jamfile +++ b/Jamfile @@ -11,15 +11,22 @@ import ../config/checks/config : requires ; # These make sure we only build on # compatible C++11 or later toolchains. +obj check_basic_alignas : check/basic_alignas.cpp ; +explicit check_basic_alignas ; + constant c11-requires : [ requires - cxx11_alignas cxx11_constexpr cxx11_decltype cxx11_hdr_tuple cxx11_template_aliases cxx11_variadic_templates ] + # We only require limited alignas support, + # so we have to use a custom check + [ check-target-builds + ..//check_basic_alignas cxx11_basic_alignas : : no + ] ; path-constant LIB_DIR : . ; diff --git a/check/basic_alignas.cpp b/check/basic_alignas.cpp new file mode 100644 index 00000000..e0bbfa50 --- /dev/null +++ b/check/basic_alignas.cpp @@ -0,0 +1,9 @@ +struct some_struct { + double d; + int n; + void* ptr; +}; + +alignas(16) char test1[10]; +alignas(double) char test2[10]; +alignas(some_struct) char test3[10]; diff --git a/fuzzing/Jamfile b/fuzzing/Jamfile index bbc43ef1..6950ecc6 100644 --- a/fuzzing/Jamfile +++ b/fuzzing/Jamfile @@ -22,6 +22,8 @@ else LIB = /boost/json//boost_json ; } +project : requirements $(c11-requires) ; + # See the comments in CMakeLists.txt for why # these are libraries and not exe targets. lib fuzzerlib_basic_parser :