diff --git a/ispc.cpp b/ispc.cpp index 6e6bb58e..4a88df77 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -1316,6 +1316,7 @@ Globals::Globals() { FATAL("Current directory path too long!"); #endif forceAlignment = -1; + dllExport = false; } /////////////////////////////////////////////////////////////////////////// diff --git a/ispc.h b/ispc.h index 095850fc..cec56056 100644 --- a/ispc.h +++ b/ispc.h @@ -612,6 +612,9 @@ struct Globals { /** Indicates that alignment in memory allocation routines should be forced to have given value. -1 value means natural alignment for the platforms. */ int forceAlignment; + + /** When true, flag non-static functions with dllexport attribute on Windows. */ + bool dllExport; }; enum { diff --git a/main.cpp b/main.cpp index 9250a3c5..edd77619 100644 --- a/main.cpp +++ b/main.cpp @@ -153,6 +153,7 @@ devUsage(int ret) { lPrintVersion(); printf("\nusage (developer options): ispc\n"); printf(" [--debug]\t\t\t\tPrint information useful for debugging ispc\n"); + printf(" [--dllexport]\t\t\tMake non-static functions DLL exported. Windows only.\n"); printf(" [--fuzz-test]\t\t\tRandomly perturb program input to test error conditions\n"); printf(" [--fuzz-seed=]\t\tSeed value for RNG for fuzz testing\n"); printf(" [--opt=