# vim: set ts=2 sw=2 tw=99 noet ft=python: import os, sys builder.SetBuildFolder('third_party/config') for compiler in Accelerator.targets: output = """ /* define if the compiler supports basic C++17 syntax */ #define HAVE_CXX17 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 """ if compiler.target.platform == "linux": output += """ /* Define to 1 if you have the header file. */ #define HAVE_A_OUT_H 1 /* Define to 1 if you have the `getcontext' function. */ #define HAVE_GETCONTEXT 1 /* Define to 1 if you have the `getrandom' function. */ #define HAVE_GETRANDOM 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_MMAN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_RANDOM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `memfd_create' function. */ #define HAVE_MEMFD_CREATE 1 """ if '-lrustc_demangle' in compiler.postlink: output += """ /* Define to 1 if you have the `rustc_demangle' library (-lrustc_demangle). */ #define HAVE_LIBRUSTC_DEMANGLE 1 /* Define to 1 if you have the header file. */ #define HAVE_RUSTC_DEMANGLE_H 1 """ if '-pthread' in compiler.postlink: output += """ /* Define if you have POSIX threads libraries and header files. */ #define HAVE_PTHREAD 1 """ if '-lzstd' in compiler.postlink: output += """ /* Define to 1 if you have the `zstd' library (-lzstd). */ #define HAVE_LIBZSTD 1 """ output += """ /* Name of package */ #define PACKAGE "breakpad" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "google-breakpad-dev@googlegroups.com" /* Define to the full name of this package. */ #define PACKAGE_NAME "breakpad" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "breakpad 0.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "breakpad" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "0.1" /* Version number of package */ #define VERSION "0.1" """ Accelerator.breakpad_config[compiler.target.arch] = [builder.AddOutputFile(os.path.join(compiler.target.arch, 'config.h'), output.encode())]