From aa928ff446b68819a946cd142b3eea230fc30da8 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 9 Aug 2023 18:47:59 -0400 Subject: [PATCH 01/10] Scripting updates, some refactors.. Made a package release script. Did refactors based on some design considerations Still need to make some major decisions... --- docs/Readme.md | 11 +- .../builder.cpp | 0 .../builder.hpp | 0 .../{file_processors => auxillary}/editor.hpp | 0 project/auxillary/scanner.cpp | 1 + .../scanner.hpp | 5 +- project/components/interface.cpp | 46 +++--- project/components/interface.parsing.cpp | 6 +- project/components/temp/ecode.hpp | 1 + project/components/temp/eoperator.hpp | 3 +- project/components/temp/especifier.hpp | 1 + project/components/temp/etoktype.cpp | 1 + project/components/types.hpp | 52 +------ project/dependencies/debug.hpp | 4 +- .../{file_handling.cpp => filesystem.cpp} | 0 .../{file_handling.hpp => filesystem.hpp} | 0 project/dependencies/header_start.hpp | 19 --- project/dependencies/macros.hpp | 25 ++++ project/dependencies/memory.cpp | 2 +- .../dependencies/{string.cpp => strings.cpp} | 0 .../dependencies/{string.hpp => strings.hpp} | 38 ++--- project/file_processors/scanner.cpp | 0 project/gen.bootstrap.cpp | 75 +++++----- project/gen.dep.cpp | 4 +- project/gen.dep.hpp | 4 +- project/helpers/helper.hpp | 8 +- project/helpers/undef.macros.hpp | 2 +- scripts/Readme.md | 16 +- scripts/clean.ps1 | 21 +-- scripts/gencpp.natvis | 2 +- scripts/gencpp.refactor | 141 ++++++++++++------ scripts/package_release.ps1 | 41 +++++ singleheader/gen.singleheader.cpp | 74 ++++----- test/SOA.cpp | 4 +- test/parsed/Array.Parsed.hpp | 2 +- test/parsed/Buffer.Parsed.hpp | 2 +- test/parsed/HashTable.Parsed.hpp | 6 +- test/parsed/Ring.Parsed.hpp | 6 +- test/parsed/Sanity.Parsed.hpp | 18 +-- test/parsed/test.parsing.cpp | 2 +- test/sanity.cpp | 2 +- test/upfront/Array.Upfront.hpp | 2 +- test/upfront/Buffer.Upfront.hpp | 2 +- test/upfront/HashTable.Upfront.hpp | 6 +- test/upfront/Ring.Upfront.hpp | 4 +- test/upfront/Sanity.Upfront.hpp | 24 +-- 46 files changed, 371 insertions(+), 312 deletions(-) rename project/{file_processors => auxillary}/builder.cpp (100%) rename project/{file_processors => auxillary}/builder.hpp (100%) rename project/{file_processors => auxillary}/editor.hpp (100%) create mode 100644 project/auxillary/scanner.cpp rename project/{file_processors => auxillary}/scanner.hpp (91%) rename project/dependencies/{file_handling.cpp => filesystem.cpp} (100%) rename project/dependencies/{file_handling.hpp => filesystem.hpp} (100%) rename project/dependencies/{string.cpp => strings.cpp} (100%) rename project/dependencies/{string.hpp => strings.hpp} (91%) delete mode 100644 project/file_processors/scanner.cpp create mode 100644 scripts/package_release.ps1 diff --git a/docs/Readme.md b/docs/Readme.md index b4359d7..1cb5738 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -360,7 +360,7 @@ Code = code_str( ) Template metaprogramming in the traditional sense becomes possible with the use of `token_fmt` and parse constructors: ```cpp -StrC value = txt_StrC("Something"); +StrC value = txt("Something"); char const* template_str = txt( Code with to replace with token_values @@ -447,7 +447,7 @@ and have the desired specifiers assigned to them beforehand. ## Code generation and modification -There are three provided file interfaces: +There are three provided auxillary interfaces: * Builder * Editor @@ -462,11 +462,12 @@ Editor and Scanner are disabled by default, use `GEN_FEATURE_EDITOR` and `GEN_FE * The code is provided via print( code ) function will be serialized to its buffer. * When all serialization is finished, use the write() command to write the buffer to the file. -### Editor is for editing a series of files based on a set of requests provided to it +### Editor is for editing a series of files/asts based on a set of requests provided to it **Note: Not implemented yet** * The purpose is to overrite a specific file, it places its contents in a buffer to scan. +* If editing an AST it will generate a new ast as a result (ASTs are not edited). * Requests are populated using the following interface: * add : Add code. * remove : Remove code. @@ -486,7 +487,7 @@ Additionally if `GEN_FEATURE_EDITOR_REFACTOR` is defined, refactor( file_path, s Refactor is based of the refactor library and uses its interface. It will on call add a request to the queue to run the refactor script on the file. -### Scanner allows the user to generate Code ASTs by reading files +### Scanner allows the user to sift through a series of files/asts based on a set of requests provided to it **Note: Not implemented yet** @@ -495,8 +496,6 @@ It will on call add a request to the queue to run the refactor script on the fil The file will only be read from, no writing supported. -One great use case is for example: generating the single-header library for gencpp! - ### Additional Info (Editor and Scanner) When all requests have been populated, call process_requests(). diff --git a/project/file_processors/builder.cpp b/project/auxillary/builder.cpp similarity index 100% rename from project/file_processors/builder.cpp rename to project/auxillary/builder.cpp diff --git a/project/file_processors/builder.hpp b/project/auxillary/builder.hpp similarity index 100% rename from project/file_processors/builder.hpp rename to project/auxillary/builder.hpp diff --git a/project/file_processors/editor.hpp b/project/auxillary/editor.hpp similarity index 100% rename from project/file_processors/editor.hpp rename to project/auxillary/editor.hpp diff --git a/project/auxillary/scanner.cpp b/project/auxillary/scanner.cpp new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/project/auxillary/scanner.cpp @@ -0,0 +1 @@ + diff --git a/project/file_processors/scanner.hpp b/project/auxillary/scanner.hpp similarity index 91% rename from project/file_processors/scanner.hpp rename to project/auxillary/scanner.hpp index 82524cf..e9dd3ef 100644 --- a/project/file_processors/scanner.hpp +++ b/project/auxillary/scanner.hpp @@ -5,13 +5,13 @@ Code scan_file( char const* path ) FileError error = file_open_mode( & file, EFileMode_READ, path ); if ( error != EFileError_NONE ) { - fatal( "scan_file: Could not open: %s", path ); + GEN_FATAL( "scan_file: Could not open: %s", path ); } sw fsize = file_size( & file ); if ( fsize <= 0 ) { - fatal("scan_file: %s is empty", path ); + GEN_FATAL("scan_file: %s is empty", path ); } String str = String::make_reserve( GlobalAllocator, fsize ); @@ -36,7 +36,6 @@ struct SymbolInfo Code Signature; }; - struct Scanner { struct RequestEntry diff --git a/project/components/interface.cpp b/project/components/interface.cpp index f0bcb58..2c19432 100644 --- a/project/components/interface.cpp +++ b/project/components/interface.cpp @@ -15,10 +15,10 @@ void* Global_Allocator_Proc( void* allocator_data, AllocType type, sw size, sw a Arena bucket = Arena::init_from_allocator( heap(), Global_BucketSize ); if ( bucket.PhysicalStart == nullptr ) - fatal( "Failed to create bucket for Global_AllocatorBuckets"); + GEN_FATAL( "Failed to create bucket for Global_AllocatorBuckets"); if ( ! Global_AllocatorBuckets.append( bucket ) ) - fatal( "Failed to append bucket to Global_AllocatorBuckets"); + GEN_FATAL( "Failed to append bucket to Global_AllocatorBuckets"); last = & Global_AllocatorBuckets.back(); } @@ -42,10 +42,10 @@ void* Global_Allocator_Proc( void* allocator_data, AllocType type, sw size, sw a Arena bucket = Arena::init_from_allocator( heap(), Global_BucketSize ); if ( bucket.PhysicalStart == nullptr ) - fatal( "Failed to create bucket for Global_AllocatorBuckets"); + GEN_FATAL( "Failed to create bucket for Global_AllocatorBuckets"); if ( ! Global_AllocatorBuckets.append( bucket ) ) - fatal( "Failed to append bucket to Global_AllocatorBuckets"); + GEN_FATAL( "Failed to append bucket to Global_AllocatorBuckets"); last = & Global_AllocatorBuckets.back(); } @@ -68,7 +68,7 @@ internal void define_constants() { Code::Global = make_code(); - Code::Global->Name = get_cached_string( txt_StrC("Global Code") ); + Code::Global->Name = get_cached_string( txt("Global Code") ); Code::Global->Content = Code::Global->Name; Code::Invalid = make_code(); @@ -76,22 +76,22 @@ void define_constants() t_empty = (CodeType) make_code(); t_empty->Type = ECode::Typename; - t_empty->Name = get_cached_string( txt_StrC("") ); + t_empty->Name = get_cached_string( txt("") ); t_empty.set_global(); access_private = make_code(); access_private->Type = ECode::Access_Private; - access_private->Name = get_cached_string( txt_StrC("private:") ); + access_private->Name = get_cached_string( txt("private:") ); access_private.set_global(); access_protected = make_code(); access_protected->Type = ECode::Access_Protected; - access_protected->Name = get_cached_string( txt_StrC("protected:") ); + access_protected->Name = get_cached_string( txt("protected:") ); access_protected.set_global(); access_public = make_code(); access_public->Type = ECode::Access_Public; - access_public->Name = get_cached_string( txt_StrC("public:") ); + access_public->Name = get_cached_string( txt("public:") ); access_public.set_global(); attrib_api_export = def_attributes( code(GEN_API_Export_Code)); @@ -102,13 +102,13 @@ void define_constants() module_global_fragment = make_code(); module_global_fragment->Type = ECode::Untyped; - module_global_fragment->Name = get_cached_string( txt_StrC("module;") ); + module_global_fragment->Name = get_cached_string( txt("module;") ); module_global_fragment->Content = module_global_fragment->Name; module_global_fragment.set_global(); module_private_fragment = make_code(); module_private_fragment->Type = ECode::Untyped; - module_private_fragment->Name = get_cached_string( txt_StrC("module : private;") ); + module_private_fragment->Name = get_cached_string( txt("module : private;") ); module_private_fragment->Content = module_private_fragment->Name; module_private_fragment.set_global(); @@ -118,13 +118,13 @@ void define_constants() pragma_once = (CodePragma) make_code(); pragma_once->Type = ECode::Preprocess_Pragma; - pragma_once->Name = get_cached_string( txt_StrC("once") ); + pragma_once->Name = get_cached_string( txt("once") ); pragma_once->Content = pragma_once->Name; pragma_once.set_global(); param_varadic = (CodeType) make_code(); param_varadic->Type = ECode::Parameters; - param_varadic->Name = get_cached_string( txt_StrC("...") ); + param_varadic->Name = get_cached_string( txt("...") ); param_varadic->ValueType = t_empty; param_varadic.set_global(); @@ -226,12 +226,12 @@ void init() Global_AllocatorBuckets = Array::init_reserve( heap(), 128 ); if ( Global_AllocatorBuckets == nullptr ) - fatal( "Failed to reserve memory for Global_AllocatorBuckets"); + GEN_FATAL( "Failed to reserve memory for Global_AllocatorBuckets"); Arena bucket = Arena::init_from_allocator( heap(), Global_BucketSize ); if ( bucket.PhysicalStart == nullptr ) - fatal( "Failed to create first bucket for Global_AllocatorBuckets"); + GEN_FATAL( "Failed to create first bucket for Global_AllocatorBuckets"); Global_AllocatorBuckets.append( bucket ); @@ -242,12 +242,12 @@ void init() CodePools = Array::init_reserve( Allocator_DataArrays, InitSize_DataArrays ); if ( CodePools == nullptr ) - fatal( "gen::init: Failed to initialize the CodePools array" ); + GEN_FATAL( "gen::init: Failed to initialize the CodePools array" ); StringArenas = Array::init_reserve( Allocator_DataArrays, InitSize_DataArrays ); if ( StringArenas == nullptr ) - fatal( "gen::init: Failed to initialize the StringArenas array" ); + GEN_FATAL( "gen::init: Failed to initialize the StringArenas array" ); } // Setup the code pool and code entries arena. @@ -255,7 +255,7 @@ void init() Pool code_pool = Pool::init( Allocator_CodePool, CodePool_NumBlocks, sizeof(AST) ); if ( code_pool.PhysicalStart == nullptr ) - fatal( "gen::init: Failed to initialize the code pool" ); + GEN_FATAL( "gen::init: Failed to initialize the code pool" ); CodePools.append( code_pool ); @@ -264,7 +264,7 @@ void init() Arena string_arena = Arena::init_from_allocator( Allocator_StringArena, SizePer_StringArena ); if ( string_arena.PhysicalStart == nullptr ) - fatal( "gen::init: Failed to initialize the string arena" ); + GEN_FATAL( "gen::init: Failed to initialize the string arena" ); StringArenas.append( string_arena ); } @@ -274,7 +274,7 @@ void init() StringCache = StringTable::init( Allocator_StringTable ); if ( StringCache.Entries == nullptr ) - fatal( "gen::init: Failed to initialize the StringCache"); + GEN_FATAL( "gen::init: Failed to initialize the StringCache"); } define_constants(); @@ -362,7 +362,7 @@ AllocatorInfo get_string_allocator( s32 str_length ) Arena new_arena = Arena::init_from_allocator( Allocator_StringArena, SizePer_StringArena ); if ( ! StringArenas.append( new_arena ) ) - fatal( "gen::get_string_allocator: Failed to allocate a new string arena" ); + GEN_FATAL( "gen::get_string_allocator: Failed to allocate a new string arena" ); last = & StringArenas.back(); } @@ -397,10 +397,10 @@ Code make_code() Pool code_pool = Pool::init( Allocator_CodePool, CodePool_NumBlocks, sizeof(AST) ); if ( code_pool.PhysicalStart == nullptr ) - fatal( "gen::make_code: Failed to allocate a new code pool - CodePool allcoator returned nullptr." ); + GEN_FATAL( "gen::make_code: Failed to allocate a new code pool - CodePool allcoator returned nullptr." ); if ( ! CodePools.append( code_pool ) ) - fatal( "gen::make_code: Failed to allocate a new code pool - CodePools failed to append new pool." ); + GEN_FATAL( "gen::make_code: Failed to allocate a new code pool - CodePools failed to append new pool." ); allocator = & CodePools.back(); } diff --git a/project/components/interface.parsing.cpp b/project/components/interface.parsing.cpp index cf7d6ed..790d4c9 100644 --- a/project/components/interface.parsing.cpp +++ b/project/components/interface.parsing.cpp @@ -1122,7 +1122,7 @@ if ( def.Ptr == nullptr ) \ # define check( Type_ ) ( left && currtok.Type == Type_ ) # define push_scope() \ - StackNode scope { nullptr, currtok, NullToken, txt_StrC( __func__ ) }; \ + StackNode scope { nullptr, currtok, NullToken, txt( __func__ ) }; \ Context.push( & scope ) #pragma endregion Helper Macros @@ -1329,7 +1329,7 @@ Code parse_static_assert() char const* result = str_fmt_buf( "%.*s\n", content.Length, content.Text ); - assert->Content = get_cached_string( to_StrC( result ) ); + assert->Content = get_cached_string( to_str( result ) ); assert->Name = assert->Content; Context.pop(); @@ -2264,7 +2264,7 @@ Code parse_simple_preprocess( Parser::TokType which ) char const* content = str_fmt_buf( "%.*s\n", tok.Length, tok.Text ); - Code result = untyped_str( to_StrC( content ) ); + Code result = untyped_str( to_str( content ) ); Context.Scope->Name = tok; if ( str_compare( Context.Scope->Prev->ProcName.Ptr, "parse_typedef", Context.Scope->Prev->ProcName.Len ) != 0 ) diff --git a/project/components/temp/ecode.hpp b/project/components/temp/ecode.hpp index 891a848..26428f7 100644 --- a/project/components/temp/ecode.hpp +++ b/project/components/temp/ecode.hpp @@ -89,4 +89,5 @@ namespace ECode # undef Define_Types } using CodeT = ECode::Type; +using ECode::to_str; diff --git a/project/components/temp/eoperator.hpp b/project/components/temp/eoperator.hpp index 03b1b4f..3fb0b46 100644 --- a/project/components/temp/eoperator.hpp +++ b/project/components/temp/eoperator.hpp @@ -64,7 +64,7 @@ namespace EOperator # define Entry( Type_, Token_ ) { sizeof(stringize(Token_)), stringize(Token_) }, Define_Operators # undef Entry - txt_StrC(",") + txt(",") }; return lookup[ op ]; @@ -73,4 +73,5 @@ namespace EOperator # undef Define_Operators } using OperatorT = EOperator::Type; +using EOperator::to_str; diff --git a/project/components/temp/especifier.hpp b/project/components/temp/especifier.hpp index 9c371f0..d0672e2 100644 --- a/project/components/temp/especifier.hpp +++ b/project/components/temp/especifier.hpp @@ -107,4 +107,5 @@ namespace ESpecifier # undef Define_Specifiers } using SpecifierT = ESpecifier::Type; +using ESpecifier::to_str; diff --git a/project/components/temp/etoktype.cpp b/project/components/temp/etoktype.cpp index bcb8bb8..edfeba6 100644 --- a/project/components/temp/etoktype.cpp +++ b/project/components/temp/etoktype.cpp @@ -165,6 +165,7 @@ namespace Parser }; using TokType = ETokType::Type; + using ETokType::to_str; } // Parser diff --git a/project/components/types.hpp b/project/components/types.hpp index 871a0cc..8caadd1 100644 --- a/project/components/types.hpp +++ b/project/components/types.hpp @@ -1,11 +1,11 @@ using LogFailType = sw(*)(char const*, ...); // By default this library will either crash or exit if an error is detected while generating codes. -// Even if set to not use fatal, fatal will still be used for memory failures as the library is unusable when they occur. +// Even if set to not use GEN_FATAL, GEN_FATAL will still be used for memory failures as the library is unusable when they occur. #ifdef GEN_DONT_USE_FATAL #define log_failure log_fmt #else - #define log_failure fatal + #define log_failure GEN_FATAL #endif enum class AccessSpec : u32 @@ -46,7 +46,6 @@ enum class EnumT : u8 constexpr EnumT EnumClass = EnumT::Class; constexpr EnumT EnumRegular = EnumT::Regular; - enum class ModuleFlag : u32 { None = 0, @@ -76,50 +75,3 @@ constexpr EPreprocessCond PreprocessCond_IfDef = EPreprocessCond::IfDef; constexpr EPreprocessCond PreprocessCond_IfNotDef = EPreprocessCond::IfNotDef; constexpr EPreprocessCond PreprocessCond_ElIf = EPreprocessCond::ElIf; -/* - Predefined attributes - Used for the parser constructors to identify non-standard attributes - - Override these to change the attribute to your own unique identifier convention. - - The tokenizer identifies attribute defines with the GEN_DEFINE_ATTRIBUTE_TOKENS macros. - See the example below and the Define_TokType macro used in gen.cpp to know the format. - While the library can parse raw attributes, most projects use defines to wrap them for compiler - platform indendence. The token define allows support for them without having to modify the library. -*/ -#if defined(GEN_SYSTEM_WINDOWS) || defined( __CYGWIN__ ) -#ifndef GEN_Attribute_Keyword -# define GEN_API_Export_Code __declspec(dllexport) -# define GEN_API_Import_Code __declspec(dllimport) -# define GEN_Attribute_Keyword __declspec -#endif - -constexpr char const* Attribute_Keyword = stringize( GEN_Attribute_Keyword); - -#elif GEN_HAS_ATTRIBUTE( visibility ) || GEN_GCC_VERSION_CHECK( 3, 3, 0 ) -#ifndef GEN_Attribute_Keyword -# define GEN_API_Export_Code __attribute__ ((visibility ("default"))) -# define GEN_API_Import_Code __attribute__ ((visibility ("default"))) -# define GEN_Attribute_Keyword __attribute__ -#endif - -constexpr char const* Attribute_Keyword = stringize( GEN_Attribute_Keyword ); - -#else -#ifndef GEN_Attribute_Keyword -# define GEN_API_Export_Code -# define GEN_API_Import_Code -# define GEN_Attribute_Keyword -#endif - -constexpr char const* Attribute_Keyword = ""; - -#endif - -// Implements basic string interning. Data structure is based off the ZPL Hashtable. -using StringTable = HashTable; - -// Represents strings cached with the string table. -// Should never be modified, if changed string is desired, cache_string( str ) another. -using StringCached = String const; - diff --git a/project/dependencies/debug.hpp b/project/dependencies/debug.hpp index ba20468..e53d4aa 100644 --- a/project/dependencies/debug.hpp +++ b/project/dependencies/debug.hpp @@ -34,7 +34,7 @@ s32 assert_crash( char const* condition ); void process_exit( u32 code ); #if Build_Debug - #define fatal( fmt, ... ) \ + #define GEN_FATAL( fmt, ... ) \ do \ { \ local_persist thread_local \ @@ -46,7 +46,7 @@ void process_exit( u32 code ); while (0) #else -# define fatal( fmt, ... ) \ +# define GEN_FATAL( fmt, ... ) \ do \ { \ str_fmt_out_err( fmt, __VA_ARGS__ ); \ diff --git a/project/dependencies/file_handling.cpp b/project/dependencies/filesystem.cpp similarity index 100% rename from project/dependencies/file_handling.cpp rename to project/dependencies/filesystem.cpp diff --git a/project/dependencies/file_handling.hpp b/project/dependencies/filesystem.hpp similarity index 100% rename from project/dependencies/file_handling.hpp rename to project/dependencies/filesystem.hpp diff --git a/project/dependencies/header_start.hpp b/project/dependencies/header_start.hpp index d654577..95853c0 100644 --- a/project/dependencies/header_start.hpp +++ b/project/dependencies/header_start.hpp @@ -100,25 +100,6 @@ #define GEN_DEF_INLINE static #define GEN_IMPL_INLINE static inline -#ifdef GEN_COMPILER_MSVC -# define forceinline __forceinline -# define neverinline __declspec( noinline ) -#elif defined(GEN_COMPILER_GCC) -# define forceinline inline __attribute__((__always_inline__)) -# define neverinline __attribute__( ( __noinline__ ) ) -#elif defined(GEN_COMPILER_CLANG) -#if __has_attribute(__always_inline__) -# define forceinline inline __attribute__((__always_inline__)) -# define neverinline __attribute__( ( __noinline__ ) ) -#else -# define forceinline -# define neverinline -#endif -#else -# define forceinline -# define neverinline -#endif - #pragma endregion Platform Detection #pragma region Mandatory Includes diff --git a/project/dependencies/macros.hpp b/project/dependencies/macros.hpp index 34824f9..5774303 100644 --- a/project/dependencies/macros.hpp +++ b/project/dependencies/macros.hpp @@ -8,6 +8,25 @@ #define internal static // Internal linkage #define local_persist static // Local Persisting variables +#ifdef GEN_COMPILER_MSVC +# define forceinline __forceinline +# define neverinline __declspec( noinline ) +#elif defined(GEN_COMPILER_GCC) +# define forceinline inline __attribute__((__always_inline__)) +# define neverinline __attribute__( ( __noinline__ ) ) +#elif defined(GEN_COMPILER_CLANG) +#if __has_attribute(__always_inline__) +# define forceinline inline __attribute__((__always_inline__)) +# define neverinline __attribute__( ( __noinline__ ) ) +#else +# define forceinline +# define neverinline +#endif +#else +# define forceinline +# define neverinline +#endif + // Bits #define bit( Value ) ( 1 << Value ) @@ -125,6 +144,12 @@ #define min( a, b ) ( ( a ) < ( b ) ? ( a ) : ( b ) ) #define size_of( x ) ( sw )( sizeof( x ) ) +#if defined( _MSC_VER ) || defined( GEN_COMPILER_TINYC ) +# define offset_of( Type, element ) ( ( GEN_NS( gen_sw ) ) & ( ( ( Type* )0 )->element ) ) +#else +# define offset_of( Type, element ) __builtin_offsetof( Type, element ) +#endif + template< class Type > void swap( Type& a, Type& b ) { diff --git a/project/dependencies/memory.cpp b/project/dependencies/memory.cpp index 39c83d1..911bf08 100644 --- a/project/dependencies/memory.cpp +++ b/project/dependencies/memory.cpp @@ -221,7 +221,7 @@ void* Arena::allocator_proc( void* allocator_data, AllocType type, sw size, sw a if ( arena->TotalUsed + total_size > (sw) arena->TotalSize ) { // zpl__printf_err("%s", "Arena out of memory\n"); - fatal("Arena out of memory! (Possibly could not fit for the largest size Arena!!)"); + GEN_FATAL("Arena out of memory! (Possibly could not fit for the largest size Arena!!)"); return nullptr; } diff --git a/project/dependencies/string.cpp b/project/dependencies/strings.cpp similarity index 100% rename from project/dependencies/string.cpp rename to project/dependencies/strings.cpp diff --git a/project/dependencies/string.hpp b/project/dependencies/strings.hpp similarity index 91% rename from project/dependencies/string.hpp rename to project/dependencies/strings.hpp index 001c70d..18b145c 100644 --- a/project/dependencies/string.hpp +++ b/project/dependencies/strings.hpp @@ -1,4 +1,4 @@ -#pragma region String +#pragma region Strings // Constant string with length. struct StrC @@ -12,18 +12,14 @@ struct StrC } }; -#define txt_StrC( text ) StrC { sizeof( text ) - 1, text } +#define cast_to_strc( str ) * rcast( StrC*, str - sizeof(sw) ) +#define txt( text ) StrC { sizeof( text ) - 1, text } -StrC to_StrC( char const* str ) +StrC to_str( char const* str ) { return { str_len( str ), str }; } -sw StrC_len( char const* str ) -{ - return (sw) ( str - 1 ); -} - // Dynamic String // This is directly based off the ZPL string api. // They used a header pattern @@ -33,8 +29,8 @@ struct String struct Header { AllocatorInfo Allocator; - sw Length; sw Capacity; + sw Length; }; static @@ -92,7 +88,7 @@ struct String return { nullptr }; Header& - header = * rcast(Header*, allocation); + header = * rcast(Header*, allocation); header = { allocator, length, length }; String result = { rcast( char*, allocation) + header_size }; @@ -332,11 +328,7 @@ struct String operator StrC() const { - return - { - length(), - Data - }; + return { length(), Data }; } // Used with cached strings @@ -363,19 +355,21 @@ struct String return Data[ index ]; } - char* Data = nullptr; + char* Data; }; struct String_POD { char* Data; - - operator String() - { - return * rcast(String*, this); - } }; static_assert( sizeof( String_POD ) == sizeof( String ), "String is not a POD" ); -#pragma endregion String +// Implements basic string interning. Data structure is based off the ZPL Hashtable. +using StringTable = HashTable; + +// Represents strings cached with the string table. +// Should never be modified, if changed string is desired, cache_string( str ) another. +using StringCached = String const; + +#pragma endregion Strings diff --git a/project/file_processors/scanner.cpp b/project/file_processors/scanner.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/project/gen.bootstrap.cpp b/project/gen.bootstrap.cpp index d7140dc..9cf1ab1 100644 --- a/project/gen.bootstrap.cpp +++ b/project/gen.bootstrap.cpp @@ -3,15 +3,16 @@ #define GEN_EXPOSE_BACKEND #include "gen.cpp" +#include "helpers/push_ignores.inline.hpp" #include "helpers/helper.hpp" GEN_NS_BEGIN #include "dependencies/parsing.cpp" GEN_NS_END -#include "file_processors/builder.hpp" -#include "file_processors/builder.cpp" -#include "file_processors/scanner.hpp" +#include "auxillary/builder.hpp" +#include "auxillary/builder.cpp" +#include "auxillary/scanner.hpp" using namespace gen; @@ -28,18 +29,18 @@ int gen_main() // gen_dep.hpp { - Code header_start = scan_file( "dependencies/header_start.hpp" ); - Code macros = scan_file( "dependencies/macros.hpp" ); - Code basic_types = scan_file( "dependencies/basic_types.hpp" ); - Code debug = scan_file( "dependencies/debug.hpp" ); - Code memory = scan_file( "dependencies/memory.hpp" ); - Code string_ops = scan_file( "dependencies/string_ops.hpp" ); - Code printing = scan_file( "dependencies/printing.hpp" ); - Code containers = scan_file( "dependencies/containers.hpp" ); - Code hashing = scan_file( "dependencies/hashing.hpp" ); - Code string = scan_file( "dependencies/string.hpp" ); - Code file_handling = scan_file( "dependencies/file_handling.hpp" ); - Code timing = scan_file( "dependencies/timing.hpp" ); + Code header_start = scan_file( "dependencies/header_start.hpp" ); + Code macros = scan_file( "dependencies/macros.hpp" ); + Code basic_types = scan_file( "dependencies/basic_types.hpp" ); + Code debug = scan_file( "dependencies/debug.hpp" ); + Code memory = scan_file( "dependencies/memory.hpp" ); + Code string_ops = scan_file( "dependencies/string_ops.hpp" ); + Code printing = scan_file( "dependencies/printing.hpp" ); + Code containers = scan_file( "dependencies/containers.hpp" ); + Code hashing = scan_file( "dependencies/hashing.hpp" ); + Code strings = scan_file( "dependencies/strings.hpp" ); + Code filesystem = scan_file( "dependencies/filesystem.hpp" ); + Code timing = scan_file( "dependencies/timing.hpp" ); Builder header = Builder::open("gen/gen.dep.hpp"); @@ -56,8 +57,8 @@ int gen_main() header.print( printing ); header.print( containers ); header.print( hashing ); - header.print( string ); - header.print( file_handling ); + header.print( strings ); + header.print( filesystem ); header.print( timing ); header.print_fmt( "GEN_NS_END\n\n" ); @@ -66,15 +67,15 @@ int gen_main() // gen_dep.cpp { - Code src_start = scan_file( "dependencies/src_start.cpp" ); - Code debug = scan_file( "dependencies/debug.cpp" ); - Code string_ops = scan_file( "dependencies/string_ops.cpp" ); - Code printing = scan_file( "dependencies/printing.cpp" ); - Code memory = scan_file( "dependencies/memory.cpp" ); - Code hashing = scan_file( "dependencies/hashing.cpp" ); - Code string = scan_file( "dependencies/string.cpp" ); - Code file_handling = scan_file( "dependencies/file_handling.cpp" ); - Code timing = scan_file( "dependencies/timing.cpp" ); + Code src_start = scan_file( "dependencies/src_start.cpp" ); + Code debug = scan_file( "dependencies/debug.cpp" ); + Code string_ops = scan_file( "dependencies/string_ops.cpp" ); + Code printing = scan_file( "dependencies/printing.cpp" ); + Code memory = scan_file( "dependencies/memory.cpp" ); + Code hashing = scan_file( "dependencies/hashing.cpp" ); + Code strings = scan_file( "dependencies/strings.cpp" ); + Code filesystem = scan_file( "dependencies/filesystem.cpp" ); + Code timing = scan_file( "dependencies/timing.cpp" ); Builder src = Builder::open( "gen/gen.dep.cpp" ); @@ -88,8 +89,8 @@ int gen_main() src.print( printing ); src.print( hashing ); src.print( memory ); - src.print( string ); - src.print( file_handling ); + src.print( strings ); + src.print( filesystem ); src.print( timing ); src.print_fmt( "GEN_NS_END\n\n" ); @@ -189,13 +190,13 @@ int gen_main() // gen_builder.hpp { - Code builder = scan_file( "file_processors/builder.hpp" ); + Code builder = scan_file( "auxillary/builder.hpp" ); Builder header = Builder::open( "gen/gen.builder.hpp" ); header.print_fmt( generation_notice ); header.print_fmt( "#pragma once\n\n" ); - header.print( def_include( txt_StrC("gen.hpp") )); + header.print( def_include( txt("gen.hpp") )); header.print_fmt( "\nGEN_NS_BEGIN\n\n" ); header.print( builder ); header.print_fmt( "\nGEN_NS_END\n\n" ); @@ -204,12 +205,12 @@ int gen_main() // gen_builder.cpp { - Code builder = scan_file( "file_processors/builder.cpp" ); + Code builder = scan_file( "auxillary/builder.cpp" ); Builder src = Builder::open( "gen/gen.builder.cpp" ); src.print_fmt( generation_notice ); - src.print( def_include( txt_StrC("gen.builder.hpp") ) ); + src.print( def_include( txt("gen.builder.hpp") ) ); src.print_fmt( "\nGEN_NS_BEGIN\n\n" ); src.print( builder ); src.print_fmt( "\nGEN_NS_END\n\n" ); @@ -219,13 +220,13 @@ int gen_main() // gen_scanner.hpp { Code parsing = scan_file( "dependencies/parsing.hpp" ); - Code scanner = scan_file( "file_processors/scanner.hpp" ); + Code scanner = scan_file( "auxillary/scanner.hpp" ); Builder header = Builder::open( "gen/gen.scanner.hpp" ); header.print_fmt( generation_notice ); header.print_fmt( "#pragma once\n\n" ); - header.print( def_include( txt_StrC("gen.hpp") ) ); + header.print( def_include( txt("gen.hpp") ) ); header.print_fmt( "\nGEN_NS_BEGIN\n\n" ); header.print( parsing ); header.print( scanner ); @@ -236,15 +237,15 @@ int gen_main() // gen_scanner.cpp { Code parsing = scan_file( "dependencies/parsing.cpp" ); - // Code scanner = scan_file( "file_processors/scanner.cpp" ); + Code scanner = scan_file( "auxillary/scanner.cpp" ); Builder src = Builder::open( "gen/gen.scanner.cpp" ); src.print_fmt( generation_notice ); - src.print( def_include( txt_StrC("gen.scanner.hpp") ) ); + src.print( def_include( txt("gen.scanner.hpp") ) ); src.print_fmt( "\nGEN_NS_BEGIN\n\n" ); src.print( parsing ); - // src.print( scanner ); + src.print( scanner ); src.print_fmt( "\nGEN_NS_END\n\n" ); src.write(); } diff --git a/project/gen.dep.cpp b/project/gen.dep.cpp index 3a7d275..16ad02f 100644 --- a/project/gen.dep.cpp +++ b/project/gen.dep.cpp @@ -10,8 +10,8 @@ GEN_NS_BEGIN #include "dependencies/printing.cpp" #include "dependencies/memory.cpp" #include "dependencies/hashing.cpp" -#include "dependencies/string.cpp" -#include "dependencies/file_handling.cpp" +#include "dependencies/strings.cpp" +#include "dependencies/filesystem.cpp" #include "dependencies/timing.cpp" GEN_NS_END diff --git a/project/gen.dep.hpp b/project/gen.dep.hpp index b67b245..7a245a7 100644 --- a/project/gen.dep.hpp +++ b/project/gen.dep.hpp @@ -13,8 +13,8 @@ GEN_NS_BEGIN #include "dependencies/printing.hpp" #include "dependencies/containers.hpp" #include "dependencies/hashing.hpp" -#include "dependencies/string.hpp" -#include "dependencies/file_handling.hpp" +#include "dependencies/strings.hpp" +#include "dependencies/filesystem.hpp" #include "dependencies/timing.hpp" GEN_NS_END diff --git a/project/helpers/helper.hpp b/project/helpers/helper.hpp index dbc578c..890adf3 100644 --- a/project/helpers/helper.hpp +++ b/project/helpers/helper.hpp @@ -531,7 +531,7 @@ CodeBody gen_ast_inlines() CodeBody impl_cast_var = parse_global_body( token_fmt( "typename", StrC name(Var), cast_tmpl )); CodeBody result = def_global_body( args( - def_pragma( txt_StrC("region generated code inline implementation")), + def_pragma( txt("region generated code inline implementation")), fmt_newline, impl_code, impl_code_body, @@ -563,9 +563,9 @@ CodeBody gen_ast_inlines() impl_code_using, impl_code_var, fmt_newline, - def_pragma( txt_StrC("endregion generated code inline implementation")), + def_pragma( txt("endregion generated code inline implementation")), fmt_newline, - def_pragma( txt_StrC("region generated AST/Code cast implementation")), + def_pragma( txt("region generated AST/Code cast implementation")), fmt_newline, impl_cast_body, impl_cast_attribute, @@ -596,7 +596,7 @@ CodeBody gen_ast_inlines() impl_cast_using, impl_cast_var, fmt_newline, - def_pragma( txt_StrC("endregion generated AST/Code cast implementation")), + def_pragma( txt("endregion generated AST/Code cast implementation")), fmt_newline )); diff --git a/project/helpers/undef.macros.hpp b/project/helpers/undef.macros.hpp index 464aec7..82dd738 100644 --- a/project/helpers/undef.macros.hpp +++ b/project/helpers/undef.macros.hpp @@ -64,7 +64,7 @@ #undef stringize #undef stringize #undef stringize_va -#undef txt_StrC +#undef txt #undef GEN_TIME #undef gen_main diff --git a/scripts/Readme.md b/scripts/Readme.md index ec5b2de..a4aee11 100644 --- a/scripts/Readme.md +++ b/scripts/Readme.md @@ -8,6 +8,20 @@ Generation, testing, and cleanup scripts for the test directory are found here a Currently `refactor` only supports naive sort of *find and replace* feature set and will not be able to rename identifiers excluisvely to a specific context (such as only renaming member names of a specific struct, etc). +**Note: The following macros are used with specifiers and token parsing within the library:** + +* global +* internal +* local_persist +* forceinline +* neverinline + +IF they are changed the following files would need adjustment: + +* `./project/enums/ESpecifier.csv` +* `./project/enums/ETokType.csv` +* `./project/helpers/helper.hpp` + ## Build & Run Scripts **`clean.ps1`** @@ -17,7 +31,7 @@ Remove any generated content from the repository. Generate a version of gencpp where components are inlined directly to `gen.` and `gen. ` Any heavily preprocessed code is not inlined and are instead generated using the code in the `helpers` directory. -**`singlheader.build.ps1`** +**`singleheader.ps1`** Generate a single-header version of the library where all code that would normally good in the usual four files (see bootstrap) are inlined into a single `gen.hpp` file. As with the bootstrap, any heavily preprocessed code is not inlined and instead generated with helper code. diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index c6698dd..1f2d38f 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -10,6 +10,7 @@ $path_test_build = Join-Path $path_test build $path_gen = Join-Path $path_test gen $path_gen_build = Join-Path $path_gen build $path_x64 = Join-Path $path_root x64 +$path_release = Join-Path $path_root release if ( Test-Path $path_project_build) { @@ -46,22 +47,10 @@ if ( Test-Path $path_x64) Remove-Item $path_x64 -Recurse } -# [string[]] $include = 'gen.hpp', 'gen.cpp', 'gen_dep.hpp', 'gen_dep.cpp' -# [string[]] $exclude = - -# $files = Get-ChildItem -Recurse -Path $path_project_gen -Include $include -Exclude $exclude - -# if ( $files ) -# { -# Remove-Item $files -# } - -# $files = Get-ChildItem -Recurse -Path $path_singleheader_gen -Include $include -Exclude $exclude - -# if ( $files ) -# { -# Remove-Item $files -# } +if ( Test-Path $path_release ) +{ + Remove-Item $path_release -Recurse +} $include = '*.h', '*.hpp', '*.cpp' $exclude = diff --git a/scripts/gencpp.natvis b/scripts/gencpp.natvis index 5673a1c..09c3b67 100644 --- a/scripts/gencpp.natvis +++ b/scripts/gencpp.natvis @@ -48,8 +48,8 @@ {(Header*)((char*)Data - sizeof(Header))} ((Header*)((char*)Data - sizeof(Header)))->Allocator - ((Header*)((char*)Data - sizeof(Header)))->Length ((Header*)((char*)Data - sizeof(Header)))->Capacity + ((Header*)((char*)Data - sizeof(Header)))->Length diff --git a/scripts/gencpp.refactor b/scripts/gencpp.refactor index 9f46a0d..cf9c1cb 100644 --- a/scripts/gencpp.refactor +++ b/scripts/gencpp.refactor @@ -21,8 +21,8 @@ // Gen Macro namespace // namespace GEN_, new_namespace_ -// ---------- ZPL Macros - +// ---------- Dependency Macros + // Platform // word GEN_ARCH_64_BIT, new_name // word GEN_ARCH_32_BIT, new_name @@ -43,20 +43,86 @@ // word GEN_COMPILER_MINGW, new_name // word GEN_COMPILER_MSVC, new_name -// word forceinline, new_name -// word neverinline, new_name - + // General // word zpl_cast, new_name // word global, new_name // word internal, new_name // word local_persist, new_name +// word forceinline, new_name +// word neverinline, new_name +// word bit, new_name +// word bitfield_is_equal, new_name + +// word ccast, new_name +// word pcast, new_name +// word rcast, new_name +// word scast, new_name + +// word num_args, new_name +// word num_args_impl, new_name + +// word stringize, new_name +// word stringize_va, new_name + +// word do_once, new_name +// word do_once_start, new_name +// word do_once_end, new_name +// word label_scope_start, new_name +// word label_scope_end, new_name + +// word count_of, new_name +// word is_between, new_name +// word min, new_name +// word size_of, new_name +// word offset_of, new_name +// word swap, new_name + + // Basic Types +// word GEN_U8_MIN, new_name +// word GEN_U8_MAX, new_name +// word GEN_I8_MIN, new_name +// word GEN_I8_MAX, new_name + +// word GEN_U16_MIN, new_name +// word GEN_U16_MAX, new_name +// word GEN_I16_MIN, new_name +// word GEN_I16_MAX, new_name + +// word GEN_U32_MIN, new_name +// word GEN_U32_MAX, new_name +// word GEN_I32_MIN, new_name +// word GEN_I32_MAX, new_name + +// word GEN_U64_MIN, new_name +// word GEN_U64_MAX, new_name +// word GEN_I64_MIN, new_name +// word GEN_I64_MAX, new_name + +// word GEN_USIZE_MIN, new_name +// word GEN_USIZE_MAX, new_name +// word GEN_ISIZE_MIN, new_name +// word GEN_ISIZE_MAX, new_name + +// word GEN_F32_MIN, new_name +// word GEN_F32_MAX, new_name +// word GEN_F64_MIN, new_name +// word GEN_F64_MAX, new_name + + // Debug // word GEN_DEBUG_TRAP, new_name // word GEN_ASSERT, new_name // word GEN_ASSERT_MSG, new_name // word GEN_ASSERT_NOT_NULL, new_name // word GEN_PANIC, new_name +// word GEN_FATAL, new_name + + // Memory +// word kilobytes, new_name +// word megabytes, new_name +// word gigabytes, new_name +// word terabytes, new_name // word zero_item, new_name // word zero_array, new_name @@ -67,13 +133,11 @@ // word malloc, new_name // word mfree, new_name -// word count_of, new_name -// word is_between, new_name -// word min, new_name -// word size_of, new_name -// word swap, new_name + // Strings +// word txt, new_name +// word cast_to_strc, new_name -// ---------- ZPL Types +// ---------- Dependency Types // word b8, new_name // word b16, new_name @@ -114,11 +178,11 @@ // word FileStandardType, new_name // word SeekWhenceType, new_name -// ---------- ZPL Data +// ---------- Dependency Data // word default_file_operations, new_name -// ---------- ZPL Procedures +// ---------- Dependency Procedures // word align_forward, new_name // word align_fordward_i64, new_name @@ -158,6 +222,7 @@ // word hex_digit_to_int, new_name // word i64_to_str, new_name // word is_power_of_two, new_name +// word log_fmt, new_name // word mem_copy, new_name // word mem_move, new_name // word mem_set, new_name @@ -189,22 +254,10 @@ // ---------- gencpp Macros -// word bit, new_name -// word bitfield_is_equal, new_name +// word log_failure, new_name -// word ccast, new_name -// word pcast, new_name -// word rcast, new_name -// word scast, new_name - -// word do_once, new_name -// word do_once_start, new_name -// word do_once_end, new_name -// word num_args, new_name -// word num_args_impl, new_name -// word stringize, new_name -// word stringize_va, new_name -// word txt_StrC, new_name +// word NoCode, new_name +// word CodeInvalid, new_name // ------------ gencpp common @@ -215,16 +268,13 @@ // word StrC, new_name // word String, new_name -// word log_fmt, new_name -// word fatal, new_name -// word to_str, new_name -// word to_StrC, new_name -// word to_type, new_name +// word to_str, new_name +// word to_str, new_name +// word to_type, new_name // ------------ gencpp Types & Constants // word LogFailType, new_name -// word log_failure, new_name // word AccessSpec, new_name // word ECode, new_name @@ -251,7 +301,6 @@ // word Code, new_name // word Code_POD, new_name // word Keyword, new_name -// word NoCode, new_name // ------------ gencpp API @@ -277,6 +326,9 @@ // word def_attributes, new_name // word def_comment, new_name // word def_class, new_name +// word def_constructor, new_name +// word def_destructor, new_name +// word def_define, new_name // word def_enum, new_name // word def_execution, new_name // word def_extern_link, new_name @@ -286,7 +338,10 @@ // word def_module, new_name // word def_namespace, new_name // word def_operator, new_name +// word def_operator_cast, new_name // word def_param, new_name +// word def_pargma, new_name +// word def_preprocess_cond, new_name // word def_specifier, new_name // word def_struct, new_name // word def_template, new_name @@ -343,22 +398,24 @@ // word untyped_fmt, new_name // word untyped_token_fmt, new_name -// ------------ File Handling +// ------------ File Ops // word Builder, new_name // word Editor, new_name // word Scanner, new_name -// ------------ gencpp macros +// ------------ gencpp user macros // word gen_main, new_name // word GEN_TIME, new_name -// word __, new_name -// word code, new_name -// word name, new_name -// word args, new_name -// word token_fmt, new_name +// word __, new_name +// word name, new_name +// word code, new_name +// word args, new_name +// word code_str, new_name +// word code_fmt, new_name +// word token_fmt, new_name // ------------ Type AST namespace // namespace t_, new_namespace_ diff --git a/scripts/package_release.ps1 b/scripts/package_release.ps1 new file mode 100644 index 0000000..839b63d --- /dev/null +++ b/scripts/package_release.ps1 @@ -0,0 +1,41 @@ +cls +Invoke-Expression "& $(Join-Path $PSScriptRoot 'bootstrap.ci.ps1')" +Invoke-Expression "& $(Join-Path $PSScriptRoot 'singleheader.ci.ps1')" + +$path_root = git rev-parse --show-toplevel +$path_docs = Join-Path $path_root docs +$path_project = Join-Path $path_root project +$path_project_gen = Join-Path $path_project gen +$path_singleheader = Join-Path $path_root singleheader +$path_singleheader_gen = Join-Path $path_singleheader gen +$path_release = Join-Path $path_root release +$path_release_content = Join-Path $path_release content + +if ( -not(Test-Path $path_release) ) { + New-Item -ItemType Directory -Path $path_release +} + +if ( -not(Test-Path $path_release_content) ) { + New-Item -ItemType Directory -Path $path_release_content +} + +$license = Join-Path $path_root LICENSE +$readme_root = Join-Path $path_root Readme.md +$readme_docs = Join-Path $path_docs Readme.md +$readme_parsing = Join-Path $path_docs Parsing.md + +Copy-Item $license -Destination $(Join-Path $path_release_content "LICENSE") +Copy-Item $readme_root -Destination $(Join-Path $path_release_content "Readme.md") +Copy-Item $readme_docs -Destination $(Join-Path $path_release_content "Readme_Docs.md") +Copy-Item $readme_parsing -Destination $(Join-Path $path_release_content "Parsing.md") + +# Singleheader +Copy-Item -Path $path_singleheader_gen\gen.hpp -Destination $path_release_content\gen.hpp +Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_singleheader.zip -Force +Remove-Item -Path $path_release_content\gen.hpp + +# Segmented +Copy-Item -Path $path_project_gen\* -Destination $path_release_content +Compress-Archive -Path $path_release_content\* -DestinationPath $path_release\gencpp_segmented.zip -Force + +Remove-Item -Path $path_release_content -Recurse diff --git a/singleheader/gen.singleheader.cpp b/singleheader/gen.singleheader.cpp index 2b5d389..774da02 100644 --- a/singleheader/gen.singleheader.cpp +++ b/singleheader/gen.singleheader.cpp @@ -3,15 +3,16 @@ #define GEN_EXPOSE_BACKEND #include "gen.cpp" +#include "helpers/push_ignores.inline.hpp" #include "helpers/helper.hpp" GEN_NS_BEGIN #include "dependencies/parsing.cpp" GEN_NS_END -#include "file_processors/builder.hpp" -#include "file_processors/builder.cpp" -#include "file_processors/scanner.hpp" +#include "auxillary/builder.hpp" +#include "auxillary/builder.cpp" +#include "auxillary/scanner.hpp" using namespace gen; @@ -19,25 +20,25 @@ constexpr char const* generation_notice = "// This file was generated automatially by gen.bootstrap.cpp " "(See: https://github.com/Ed94/gencpp)\n\n"; -constexpr StrC implementation_guard_start = txt_StrC(R"( +constexpr StrC implementation_guard_start = txt(R"( #pragma region GENCPP IMPLEMENTATION GUARD #if defined(GEN_IMPLEMENTATION) && ! defined(GEN_IMPLEMENTED) # define GEN_IMPLEMENTED )"); -constexpr StrC implementation_guard_end = txt_StrC(R"( +constexpr StrC implementation_guard_end = txt(R"( #endif #pragma endregion GENCPP IMPLEMENTATION GUARD )"); -constexpr StrC roll_own_dependencies_guard_start = txt_StrC(R"( +constexpr StrC roll_own_dependencies_guard_start = txt(R"( //! If its desired to roll your own dependencies, define GEN_ROLL_OWN_DEPENDENCIES before including this file. // Dependencies are derived from the c-zpl library: https://github.com/zpl-c/zpl #ifndef GEN_ROLL_OWN_DEPENDENCIES )"); -constexpr StrC roll_own_dependencies_guard_end = txt_StrC(R"( +constexpr StrC roll_own_dependencies_guard_end = txt(R"( // GEN_ROLL_OWN_DEPENDENCIES #endif )"); @@ -68,18 +69,18 @@ int gen_main() if ( generate_gen_dep ) { - Code header_start = scan_file( project_dir "dependencies/header_start.hpp" ); - Code macros = scan_file( project_dir "dependencies/macros.hpp" ); - Code basic_types = scan_file( project_dir "dependencies/basic_types.hpp" ); - Code debug = scan_file( project_dir "dependencies/debug.hpp" ); - Code memory = scan_file( project_dir "dependencies/memory.hpp" ); - Code string_ops = scan_file( project_dir "dependencies/string_ops.hpp" ); - Code printing = scan_file( project_dir "dependencies/printing.hpp" ); - Code containers = scan_file( project_dir "dependencies/containers.hpp" ); - Code hashing = scan_file( project_dir "dependencies/hashing.hpp" ); - Code string = scan_file( project_dir "dependencies/string.hpp" ); - Code file_handling = scan_file( project_dir "dependencies/file_handling.hpp" ); - Code timing = scan_file( project_dir "dependencies/timing.hpp" ); + Code header_start = scan_file( project_dir "dependencies/header_start.hpp" ); + Code macros = scan_file( project_dir "dependencies/macros.hpp" ); + Code basic_types = scan_file( project_dir "dependencies/basic_types.hpp" ); + Code debug = scan_file( project_dir "dependencies/debug.hpp" ); + Code memory = scan_file( project_dir "dependencies/memory.hpp" ); + Code string_ops = scan_file( project_dir "dependencies/string_ops.hpp" ); + Code printing = scan_file( project_dir "dependencies/printing.hpp" ); + Code containers = scan_file( project_dir "dependencies/containers.hpp" ); + Code hashing = scan_file( project_dir "dependencies/hashing.hpp" ); + Code strings = scan_file( project_dir "dependencies/strings.hpp" ); + Code filesystem = scan_file( project_dir "dependencies/filesystem.hpp" ); + Code timing = scan_file( project_dir "dependencies/timing.hpp" ); header.print_fmt( roll_own_dependencies_guard_start ); header.print( header_start ); @@ -93,8 +94,8 @@ int gen_main() header.print( printing ); header.print( containers ); header.print( hashing ); - header.print( string ); - header.print( file_handling ); + header.print( strings ); + header.print( filesystem ); header.print( timing ); if ( generate_scanner ) @@ -106,6 +107,7 @@ int gen_main() header.print_fmt( "GEN_NS_END\n" ); header.print_fmt( roll_own_dependencies_guard_end ); + header.print( fmt_newline ); } Code types = scan_file( project_dir "components/types.hpp" ); @@ -146,14 +148,14 @@ int gen_main() if ( generate_builder ) { header.print_fmt( "#pragma region Builder\n\n" ); - header.print( scan_file( project_dir "file_processors/builder.hpp" ) ); + header.print( scan_file( project_dir "auxillary/builder.hpp" ) ); header.print_fmt( "#pragma endregion Builder\n\n" ); } if ( generate_scanner ) { header.print_fmt( "#pragma region Scanner\n\n" ); - header.print( scan_file( project_dir "file_processors/scanner.hpp" ) ); + header.print( scan_file( project_dir "auxillary/scanner.hpp" ) ); header.print_fmt( "#pragma endregion Scanner\n\n" ); } @@ -166,15 +168,15 @@ int gen_main() if ( generate_gen_dep ) { - Code impl_start = scan_file( project_dir "dependencies/src_start.cpp" ); - Code debug = scan_file( project_dir "dependencies/debug.cpp" ); - Code string_ops = scan_file( project_dir "dependencies/string_ops.cpp" ); - Code printing = scan_file( project_dir "dependencies/printing.cpp" ); - Code memory = scan_file( project_dir "dependencies/memory.cpp" ); - Code hashing = scan_file( project_dir "dependencies/hashing.cpp" ); - Code string = scan_file( project_dir "dependencies/string.cpp" ); - Code file_handling = scan_file( project_dir "dependencies/file_handling.cpp" ); - Code timing = scan_file( project_dir "dependencies/timing.cpp" ); + Code impl_start = scan_file( project_dir "dependencies/src_start.cpp" ); + Code debug = scan_file( project_dir "dependencies/debug.cpp" ); + Code string_ops = scan_file( project_dir "dependencies/string_ops.cpp" ); + Code printing = scan_file( project_dir "dependencies/printing.cpp" ); + Code memory = scan_file( project_dir "dependencies/memory.cpp" ); + Code hashing = scan_file( project_dir "dependencies/hashing.cpp" ); + Code strings = scan_file( project_dir "dependencies/strings.cpp" ); + Code filesystem = scan_file( project_dir "dependencies/filesystem.cpp" ); + Code timing = scan_file( project_dir "dependencies/timing.cpp" ); header.print_fmt( roll_own_dependencies_guard_start ); header.print_fmt( "GEN_NS_BEGIN\n\n"); @@ -185,8 +187,8 @@ int gen_main() header.print( printing ); header.print( memory ); header.print( hashing ); - header.print( string ); - header.print( file_handling ); + header.print( strings ); + header.print( filesystem ); header.print( timing ); if ( generate_scanner ) @@ -232,7 +234,7 @@ int gen_main() if ( generate_builder ) { header.print_fmt( "#pragma region Builder\n\n" ); - header.print( scan_file( project_dir "file_processors/builder.cpp" ) ); + header.print( scan_file( project_dir "auxillary/builder.cpp" ) ); header.print_fmt( "#pragma endregion Builder\n\n" ); } @@ -240,7 +242,7 @@ int gen_main() if ( generate_scanner ) { header.print_fmt( "#pragma region Scanner\n\n" ); - header.print( scan_file( project_dir "file_processors/scanner.cpp" ) ); + header.print( scan_file( project_dir "auxillary/scanner.cpp" ) ); header.print_fmt( "#pragma endregion Scanner\n\n" ); } #endif diff --git a/test/SOA.cpp b/test/SOA.cpp index 41b7f74..5a67519 100644 --- a/test/SOA.cpp +++ b/test/SOA.cpp @@ -33,7 +33,7 @@ Code gen_SOA( CodeStruct struct_def, s32 num_entries = 0 ) if ( struct_mem->Type == ECode::Variable ) { CodeType var_type = struct_mem.cast()->ValueType; - StrC num_entries_str = to_StrC( str_fmt_buf( "%d", num_entries ) ); + StrC num_entries_str = to_str( str_fmt_buf( "%d", num_entries ) ); CodeVar entry_arr = { nullptr }; if ( ! num_entries) @@ -124,7 +124,7 @@ void check_SOA() soa_test.print( parse_using( code( using u16 = unsigned short; ))); - soa_test.print( def_include( txt_StrC("gen.hpp"))); + soa_test.print( def_include( txt("gen.hpp"))); soa_test.print( def_using_namespace( name(gen) ) ); soa_test.print( gen_SOA( diff --git a/test/parsed/Array.Parsed.hpp b/test/parsed/Array.Parsed.hpp index 9b400dc..b979da5 100644 --- a/test/parsed/Array.Parsed.hpp +++ b/test/parsed/Array.Parsed.hpp @@ -255,7 +255,7 @@ u32 gen_array_file() gen_array_file; gen_array_file.open( "array.Parsed.gen.hpp" ); - Code include_gen = def_include( txt_StrC("gen.hpp") ); + Code include_gen = def_include( txt("gen.hpp") ); gen_array_file.print( include_gen ); gen_array_file.print( def_using_namespace( name(gen))); diff --git a/test/parsed/Buffer.Parsed.hpp b/test/parsed/Buffer.Parsed.hpp index 77ca4e4..680612c 100644 --- a/test/parsed/Buffer.Parsed.hpp +++ b/test/parsed/Buffer.Parsed.hpp @@ -169,7 +169,7 @@ u32 gen_buffer_file() gen_buffer_file; gen_buffer_file.open( "buffer.Parsed.gen.hpp" ); - gen_buffer_file.print( def_include( txt_StrC("gen.hpp")) ); + gen_buffer_file.print( def_include( txt("gen.hpp")) ); gen_buffer_file.print( def_using_namespace( name(gen))); gen_buffer_file.print( gen__buffer_base() ); diff --git a/test/parsed/HashTable.Parsed.hpp b/test/parsed/HashTable.Parsed.hpp index 439c8df..06b3404 100644 --- a/test/parsed/HashTable.Parsed.hpp +++ b/test/parsed/HashTable.Parsed.hpp @@ -320,9 +320,9 @@ u32 gen_hashtable_file() gen_hashtable_file; gen_hashtable_file.open( "hashtable.Parsed.gen.hpp" ); - gen_hashtable_file.print( def_include( txt_StrC("gen.hpp")) ); - gen_hashtable_file.print( def_include( txt_StrC("Array.Parsed.hpp")) ); - gen_hashtable_file.print( def_include( txt_StrC("array.Parsed.gen.hpp")) ); + gen_hashtable_file.print( def_include( txt("gen.hpp")) ); + gen_hashtable_file.print( def_include( txt("Array.Parsed.hpp")) ); + gen_hashtable_file.print( def_include( txt("array.Parsed.gen.hpp")) ); gen_hashtable_file.print( def_using_namespace( name(gen))); diff --git a/test/parsed/Ring.Parsed.hpp b/test/parsed/Ring.Parsed.hpp index 12a3b36..8956f92 100644 --- a/test/parsed/Ring.Parsed.hpp +++ b/test/parsed/Ring.Parsed.hpp @@ -22,7 +22,7 @@ Code gen__ring( StrC type ) name = get_cached_string({ name_len, name_str }); }; - StrC buffer_name = to_StrC( str_fmt_buf( "Buffer_%s", type.Ptr )); + StrC buffer_name = to_str( str_fmt_buf( "Buffer_%s", type.Ptr )); Code ring = parse_struct( token_fmt( "RingName", (StrC)name, "type", type, "BufferName", buffer_name, stringize( @@ -138,8 +138,8 @@ u32 gen_ring_file() gen_ring_file; gen_ring_file.open( "ring.Parsed.gen.hpp" ); - gen_ring_file.print( def_include( txt_StrC("gen.hpp")) ); - gen_ring_file.print( def_include( txt_StrC("buffer.Parsed.gen.hpp")) ); + gen_ring_file.print( def_include( txt("gen.hpp")) ); + gen_ring_file.print( def_include( txt("buffer.Parsed.gen.hpp")) ); // gen_ring_file.print( gen__ring_base() ); gen_ring_file.print( def_using_namespace( name(gen))); diff --git a/test/parsed/Sanity.Parsed.hpp b/test/parsed/Sanity.Parsed.hpp index e4a3352..6a8d4f6 100644 --- a/test/parsed/Sanity.Parsed.hpp +++ b/test/parsed/Sanity.Parsed.hpp @@ -14,7 +14,7 @@ u32 gen_sanity() gen_sanity_file; gen_sanity_file.open("./sanity.Parsed.gen.hpp"); - gen_sanity_file.print( def_comment( txt_StrC( + gen_sanity_file.print( def_comment( txt( "The following will show a series of base cases for the gen parsed api.\n" ))); @@ -40,7 +40,7 @@ u32 gen_sanity() {}; )); - empty_body->Body.append( def_comment( txt_StrC("Empty class body") ) ); + empty_body->Body.append( def_comment( txt("Empty class body") ) ); gen_sanity_file.print(fwd); gen_sanity_file.print(empty_body); @@ -76,7 +76,7 @@ u32 gen_sanity() // External Linkage { - CodeComment empty_comment = def_comment( txt_StrC("Empty external linkage") ); + CodeComment empty_comment = def_comment( txt("Empty external linkage") ); CodeExtern c_extern = parse_extern_link( code( extern "C" @@ -122,7 +122,7 @@ u32 gen_sanity() } )); - def->Body.append( def_comment( txt_StrC("Empty function body") ) ); + def->Body.append( def_comment( txt("Empty function body") ) ); gen_sanity_file.print(fwd); gen_sanity_file.print(def); @@ -138,7 +138,7 @@ u32 gen_sanity() } )); - def->Body.append( def_comment( txt_StrC("Empty namespace body") ) ); + def->Body.append( def_comment( txt("Empty namespace body") ) ); gen_sanity_file.print(def); } @@ -205,7 +205,7 @@ u32 gen_sanity() } )); - def->Body.append( def_comment( txt_StrC("Empty function body") ) ); + def->Body.append( def_comment( txt("Empty function body") ) ); gen_sanity_file.print(fwd); gen_sanity_file.print(def); @@ -241,7 +241,7 @@ u32 gen_sanity() {}; )); - empty_body->Body.append( def_comment( txt_StrC("Empty struct body") ) ); + empty_body->Body.append( def_comment( txt("Empty struct body") ) ); gen_sanity_file.print(fwd); gen_sanity_file.print(empty_body); @@ -257,7 +257,7 @@ u32 gen_sanity() }; )); - empty->Body.append( def_comment( txt_StrC("Empty union body") ) ); + empty->Body.append( def_comment( txt("Empty union body") ) ); gen_sanity_file.print( parse_typedef( code( typedef unsigned short u16; )) ); gen_sanity_file.print( parse_typedef( code( typedef unsigned long u32; )) ); @@ -334,7 +334,7 @@ u32 gen_sanity() gen_sanity_file.print_fmt("\n"); - gen_sanity_file.print( def_comment( txt_StrC( + gen_sanity_file.print( def_comment( txt( "End of base case tests\n" ))); diff --git a/test/parsed/test.parsing.cpp b/test/parsed/test.parsing.cpp index 7f66b5b..0e5c7f7 100644 --- a/test/parsed/test.parsing.cpp +++ b/test/parsed/test.parsing.cpp @@ -43,7 +43,7 @@ int gen_main() using u16 = unsigned short; ))); - soa_test.print( def_include( txt_StrC("gen.hpp"))); + soa_test.print( def_include( txt("gen.hpp"))); soa_test.print( def_using_namespace( name(gen) ) ); diff --git a/test/sanity.cpp b/test/sanity.cpp index 534bc6a..d9309a5 100644 --- a/test/sanity.cpp +++ b/test/sanity.cpp @@ -17,7 +17,7 @@ void check_sanity() CodeType t_int_dupe = def_type( name(int) ); if ( t_int_dupe->Name != t_int->Name ) - fatal("check_sanity: String caching failed!"); + GEN_FATAL("check_sanity: String caching failed!"); // Purposefully uses an excessive amount of memory to make sure the the memory backend doesn't break. diff --git a/test/upfront/Array.Upfront.hpp b/test/upfront/Array.Upfront.hpp index ee561c8..a1137bb 100644 --- a/test/upfront/Array.Upfront.hpp +++ b/test/upfront/Array.Upfront.hpp @@ -336,7 +336,7 @@ u32 gen_array_file() gen_array_file; gen_array_file.open( "array.Upfront.gen.hpp" ); - CodeInclude include_gen = def_include( txt_StrC("gen.hpp") ); + CodeInclude include_gen = def_include( txt("gen.hpp") ); gen_array_file.print( include_gen ); gen_array_file.print( def_using_namespace( name(gen))); diff --git a/test/upfront/Buffer.Upfront.hpp b/test/upfront/Buffer.Upfront.hpp index 9ced0d3..221b1f5 100644 --- a/test/upfront/Buffer.Upfront.hpp +++ b/test/upfront/Buffer.Upfront.hpp @@ -239,7 +239,7 @@ u32 gen_buffer_file() gen_buffer_file; gen_buffer_file.open( "buffer.Upfront.gen.hpp" ); - gen_buffer_file.print( def_include( txt_StrC("gen.hpp")) ); + gen_buffer_file.print( def_include( txt("gen.hpp")) ); gen_buffer_file.print( def_using_namespace( name(gen)) ); gen_buffer_file.print( gen__buffer_base() ); diff --git a/test/upfront/HashTable.Upfront.hpp b/test/upfront/HashTable.Upfront.hpp index 2a8d03a..5485939 100644 --- a/test/upfront/HashTable.Upfront.hpp +++ b/test/upfront/HashTable.Upfront.hpp @@ -447,9 +447,9 @@ u32 gen_hashtable_file() gen_hashtable_file; gen_hashtable_file.open( "hashtable.Upfront.gen.hpp" ); - gen_hashtable_file.print( def_include( txt_StrC("gen.hpp")) ); - gen_hashtable_file.print( def_include( txt_StrC("Array.Upfront.hpp")) ); - gen_hashtable_file.print( def_include( txt_StrC("array.Upfront.gen.hpp")) ); + gen_hashtable_file.print( def_include( txt("gen.hpp")) ); + gen_hashtable_file.print( def_include( txt("Array.Upfront.hpp")) ); + gen_hashtable_file.print( def_include( txt("array.Upfront.gen.hpp")) ); gen_hashtable_file.print( def_using_namespace( name(gen))); diff --git a/test/upfront/Ring.Upfront.hpp b/test/upfront/Ring.Upfront.hpp index ade8614..01412b1 100644 --- a/test/upfront/Ring.Upfront.hpp +++ b/test/upfront/Ring.Upfront.hpp @@ -192,8 +192,8 @@ u32 gen_ring_file() gen_ring_file; gen_ring_file.open( "ring.Upfront.gen.hpp" ); - gen_ring_file.print( def_include( txt_StrC("gen.hpp")) ); - gen_ring_file.print( def_include( txt_StrC("buffer.Upfront.gen.hpp")) ); + gen_ring_file.print( def_include( txt("gen.hpp")) ); + gen_ring_file.print( def_include( txt("buffer.Upfront.gen.hpp")) ); gen_ring_file.print( def_using_namespace( name(gen))); diff --git a/test/upfront/Sanity.Upfront.hpp b/test/upfront/Sanity.Upfront.hpp index 5c9a7a0..d5d0ecc 100644 --- a/test/upfront/Sanity.Upfront.hpp +++ b/test/upfront/Sanity.Upfront.hpp @@ -11,13 +11,13 @@ u32 gen_sanity_upfront() // Comment { - CodeComment comment_test = def_comment( txt_StrC("Sanity check: def_comment test") ); + CodeComment comment_test = def_comment( txt("Sanity check: def_comment test") ); gen_sanity_file.print(comment_test); } gen_sanity_file.print_fmt("\n"); - gen_sanity_file.print( def_comment( txt_StrC( + gen_sanity_file.print( def_comment( txt( "The following will show a series of base cases for the gen api.\n" ))); @@ -26,7 +26,7 @@ u32 gen_sanity_upfront() CodeClass fwd = def_class( name(TestEmptyClass) ); CodeClass empty_body; { - CodeComment cmt = def_comment( txt_StrC("Empty class body") ); + CodeComment cmt = def_comment( txt("Empty class body") ); CodeBody body = def_class_body( args( cmt ) ); empty_body = def_class( name(TestEmptyClass), body ); @@ -74,7 +74,7 @@ u32 gen_sanity_upfront() // External Linkage { CodeBody body = def_extern_link_body( 1 - , def_comment( txt_StrC("Empty extern body") ) + , def_comment( txt("Empty extern body") ) ); CodeExtern c_extern = def_extern_link( name(C), body ); @@ -100,7 +100,7 @@ u32 gen_sanity_upfront() CodeFn def; { CodeBody body = def_function_body( 1 - , def_comment( txt_StrC("Empty function body") ) + , def_comment( txt("Empty function body") ) ); def = def_function( name(test_function), __, __, body ); @@ -114,7 +114,7 @@ u32 gen_sanity_upfront() // Include { - CodeInclude include = def_include( txt_StrC("../DummyInclude.hpp") ); + CodeInclude include = def_include( txt("../DummyInclude.hpp") ); gen_sanity_file.print(include); } @@ -142,7 +142,7 @@ u32 gen_sanity_upfront() CodeNS namespace_def; { CodeBody body = def_namespace_body( 1 - , def_comment( txt_StrC("Empty namespace body") ) + , def_comment( txt("Empty namespace body") ) ); namespace_def = def_namespace( name(TestNamespace), body ); @@ -213,7 +213,7 @@ u32 gen_sanity_upfront() CodeFn def, def2; { CodeBody body = def_function_body( 1 - , def_comment( txt_StrC("Empty function body") ) + , def_comment( txt("Empty function body") ) ); CodeParam params = def_params( args( @@ -259,7 +259,7 @@ u32 gen_sanity_upfront() CodeClass fwd = def_class( name(TestEmptyStruct) ); CodeClass empty_body; { - CodeComment cmt = def_comment( txt_StrC("Empty struct body") ); + CodeComment cmt = def_comment( txt("Empty struct body") ); CodeBody body = def_class_body( args( cmt ) ); empty_body = def_class( name(TestEmptyStruct), body ); @@ -274,7 +274,7 @@ u32 gen_sanity_upfront() // Union { CodeBody body = def_union_body( 1 - , def_comment( txt_StrC("Empty union body") ) + , def_comment( txt("Empty union body") ) ); CodeUnion def = def_union( name(TestEmptyUnion), body ); @@ -312,7 +312,7 @@ u32 gen_sanity_upfront() CodeTemplate tmpl = def_template( def_param( t_class, name(Type) ) , def_function( name(test_template), def_param( t_Type, name(a) ), __ - , def_function_body(1, def_comment( txt_StrC("Empty template function body"))) + , def_function_body(1, def_comment( txt("Empty template function body"))) ) ); @@ -321,7 +321,7 @@ u32 gen_sanity_upfront() gen_sanity_file.print_fmt("\n"); - gen_sanity_file.print( def_comment( txt_StrC( + gen_sanity_file.print( def_comment( txt( "End of base case tests.\n" ))); From 32a910515ec4321ea89c51996566f5338962ea49 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 19 Aug 2023 08:21:28 -0400 Subject: [PATCH 02/10] More refactoring, getting rid of meson in favor of just powershell scripts --- .gitignore | 2 +- .vscode/c_cpp_properties.json | 6 +- .vscode/launch.json | 2 +- docs/Parsing.md | 1 - gencpp.vcxproj | 49 +++ gencpp.vcxproj.filters | 259 +++++++++--- project/auxillary/builder.cpp | 11 +- project/{gen.bootstrap.cpp => bootstrap.cpp} | 0 project/components/ast.hpp | 2 +- project/components/interface.parsing.cpp | 4 +- project/dependencies/debug.hpp | 8 +- project/dependencies/macros.hpp | 60 +-- project/helpers/helper.hpp | 4 +- project/meson.build | 18 - scripts/Readme.md | 20 +- scripts/bootstrap.ci.ps1 | 78 ---- scripts/bootstrap.ps1 | 2 - scripts/build.ps1 | 367 ++++++++++++++++++ scripts/{msvc => helpers}/devshell.ps1 | 8 + scripts/helpers/target_arch.psm1 | 25 ++ scripts/msvc/build_msvc.ps1 | 16 - scripts/singleheader.ci.ps1 | 73 ---- scripts/singleheader.ps1 | 2 - singleheader/meson.build | 18 - ...{gen.singleheader.cpp => singleheader.cpp} | 0 25 files changed, 731 insertions(+), 304 deletions(-) rename project/{gen.bootstrap.cpp => bootstrap.cpp} (100%) delete mode 100644 project/meson.build delete mode 100644 scripts/bootstrap.ci.ps1 delete mode 100644 scripts/bootstrap.ps1 create mode 100644 scripts/build.ps1 rename scripts/{msvc => helpers}/devshell.ps1 (81%) create mode 100644 scripts/helpers/target_arch.psm1 delete mode 100644 scripts/msvc/build_msvc.ps1 delete mode 100644 scripts/singleheader.ci.ps1 delete mode 100644 scripts/singleheader.ps1 delete mode 100644 singleheader/meson.build rename singleheader/{gen.singleheader.cpp => singleheader.cpp} (100%) diff --git a/.gitignore b/.gitignore index 3104310..7603f81 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .idea -build/* +**/build/* .vs **/*.gen.* diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 7d9f8e2..8c69c10 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -12,8 +12,10 @@ "GEN_TIME" ], "windowsSdkVersion": "10.0.19041.0", - "compilerPath": "C:/Users/Ed/scoop/apps/llvm/current/bin/clang++.exe", - "intelliSenseMode": "windows-clang-x64", + // "compilerPath": "C:/Users/Ed/scoop/apps/llvm/current/bin/clang++.exe", + "compilerPath": "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe", + "intelliSenseMode": "msvc-x64", + // "intelliSenseMode": "windows-clang-x64", "compileCommands": "${workspaceFolder}/project/build/compile_commands.json" } ], diff --git a/.vscode/launch.json b/.vscode/launch.json index 73b31b1..0cde1a5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -27,7 +27,7 @@ "type": "cppvsdbg", "request": "launch", "name": "Debug bootstrap vsdbg", - "program": "${workspaceFolder}/project/build/gencpp_bootstrap.exe", + "program": "${workspaceFolder}/project/build/bootstrap.exe", "args": [], "cwd": "${workspaceFolder}/project/", "visualizerFile": "${workspaceFolder}/scripts/gencpp.natvis" diff --git a/docs/Parsing.md b/docs/Parsing.md index 20b4e19..9a538bd 100644 --- a/docs/Parsing.md +++ b/docs/Parsing.md @@ -40,7 +40,6 @@ The keywords supported for the preprocessor are: * ifdef * elif * endif -* undef * pragma Each directive `#` line is considered one preproecessor unit, and will be treated as one Preprocessor AST. *These ASTs will be considered members or entries of braced scope they reside within*. diff --git a/gencpp.vcxproj b/gencpp.vcxproj index 0887f2c..1167e0d 100644 --- a/gencpp.vcxproj +++ b/gencpp.vcxproj @@ -98,6 +98,7 @@ + @@ -111,6 +112,8 @@ + + @@ -119,6 +122,19 @@ + + + + + + + + + + + + + @@ -132,6 +148,15 @@ + + + + + + + + + @@ -140,6 +165,10 @@ + + + + @@ -157,6 +186,9 @@ + + + @@ -166,6 +198,15 @@ + + + + + + + + + @@ -176,6 +217,14 @@ + + + + + + + + diff --git a/gencpp.vcxproj.filters b/gencpp.vcxproj.filters index 4d7e755..b9da6b1 100644 --- a/gencpp.vcxproj.filters +++ b/gencpp.vcxproj.filters @@ -18,18 +18,9 @@ Source Files - - Source Files - - - Source Files - Source Files - - Source Files - Source Files @@ -60,9 +51,6 @@ Source Files - - Source Files - Source Files @@ -75,32 +63,116 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + Header Files - - Header Files - Header Files - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - Header Files @@ -137,18 +209,6 @@ Header Files - - Header Files - - - Header Files - - - Header Files - - - Header Files - Header Files @@ -170,9 +230,6 @@ Header Files - - Header Files - Header Files @@ -215,6 +272,117 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + @@ -229,6 +397,7 @@ + diff --git a/project/auxillary/builder.cpp b/project/auxillary/builder.cpp index 968bd69..694d81c 100644 --- a/project/auxillary/builder.cpp +++ b/project/auxillary/builder.cpp @@ -12,6 +12,7 @@ Builder Builder::open( char const* path ) result.Buffer = String::make_reserve( GlobalAllocator, Builder_StrBufferReserve ); + // log_fmt("$Builder - Opened file: %s\n", result.File.filename ); return result; } @@ -22,7 +23,11 @@ void Builder::pad_lines( s32 num ) void Builder::print( Code code ) { - Buffer.append( code->to_string() ); + String str = code->to_string(); + const sw len = str.length(); + + // log_fmt( "%s - print: %.*s\n", File.filename, len > 80 ? 80 : len, str.Data ); + Buffer.append( str ); } void Builder::print_fmt( char const* fmt, ... ) @@ -35,6 +40,7 @@ void Builder::print_fmt( char const* fmt, ... ) res = str_fmt_va( buf, count_of( buf ) - 1, fmt, va ) - 1; va_end( va ); + // log_fmt( "$%s - print_fmt: %.*s\n", File.filename, res > 80 ? 80 : res, buf ); Buffer.append( buf, res ); } @@ -43,8 +49,9 @@ void Builder::write() bool result = file_write( & File, Buffer, Buffer.length() ); if ( result == false ) - log_failure("gen::File::write - Failed to write to file: %s", file_name( & File ) ); + log_failure("gen::File::write - Failed to write to file: %s\n", file_name( & File ) ); + log_fmt( "Generated: %s\n", File.filename ); file_close( & File ); Buffer.free(); } diff --git a/project/gen.bootstrap.cpp b/project/bootstrap.cpp similarity index 100% rename from project/gen.bootstrap.cpp rename to project/bootstrap.cpp diff --git a/project/components/ast.hpp b/project/components/ast.hpp index aebdecc..af5e014 100644 --- a/project/components/ast.hpp +++ b/project/components/ast.hpp @@ -214,7 +214,7 @@ struct AST - sizeof(ModuleFlag) - sizeof(u32) ) - / sizeof(SpecifierT) -1; // -1 for 4 extra bytes + / sizeof(SpecifierT) - 1; // -1 for 4 extra bytes union { struct diff --git a/project/components/interface.parsing.cpp b/project/components/interface.parsing.cpp index 790d4c9..74c8d77 100644 --- a/project/components/interface.parsing.cpp +++ b/project/components/interface.parsing.cpp @@ -1409,7 +1409,7 @@ CodeAttributes parse_attributes() using namespace Parser; push_scope(); - Token start; + Token start = NullToken; s32 len = 0; if ( check(TokType::Attribute_Open) ) @@ -3186,7 +3186,7 @@ CodeConstructor parse_constructor() { eat( TokType::Assign_Classifer ); - Token initializer_list_tok; + Token initializer_list_tok = NullToken; s32 level = 0; while ( left && ( currtok.Type != TokType::BraceCurly_Open || level > 0 ) ) diff --git a/project/dependencies/debug.hpp b/project/dependencies/debug.hpp index e53d4aa..d9750e8 100644 --- a/project/dependencies/debug.hpp +++ b/project/dependencies/debug.hpp @@ -34,22 +34,22 @@ s32 assert_crash( char const* condition ); void process_exit( u32 code ); #if Build_Debug - #define GEN_FATAL( fmt, ... ) \ + #define GEN_FATAL( ... ) \ do \ { \ local_persist thread_local \ char buf[GEN_PRINTF_MAXLEN] = { 0 }; \ \ - str_fmt(buf, GEN_PRINTF_MAXLEN, fmt, __VA_ARGS__); \ + str_fmt(buf, GEN_PRINTF_MAXLEN, __VA_ARGS__); \ GEN_PANIC(buf); \ } \ while (0) #else -# define GEN_FATAL( fmt, ... ) \ +# define GEN_FATAL( ... ) \ do \ { \ - str_fmt_out_err( fmt, __VA_ARGS__ ); \ + str_fmt_out_err( __VA_ARGS__ ); \ process_exit(1); \ } \ while (0) diff --git a/project/dependencies/macros.hpp b/project/dependencies/macros.hpp index 5774303..9eba24d 100644 --- a/project/dependencies/macros.hpp +++ b/project/dependencies/macros.hpp @@ -40,7 +40,7 @@ #define scast( Type, Value ) static_cast< Type >( Value ) // Num Arguments (Varadics) -#if defined(__GNUC__) || defined(__clang__) +// #if defined(__GNUC__) || defined(__clang__) // Supports 0-50 arguments #define num_args_impl( _0, \ _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ @@ -72,37 +72,37 @@ 0 \ ) -#else +// #else // Supports 1-50 arguments -#define num_args_impl( \ - _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ - _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ - _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ - _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \ - _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \ - _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \ - _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, \ - _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, \ - _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, \ - _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, \ - N, ... \ - ) N +// #define num_args_impl( \ +// _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ +// _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ +// _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ +// _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \ +// _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \ +// _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \ +// _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, \ +// _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, \ +// _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, \ +// _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, \ +// N, ... \ +// ) N -#define num_args(...) \ - num_args_impl( __VA_ARGS__, \ - 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, \ - 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, \ - 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, \ - 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, \ - 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, \ - 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ - 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ - 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \ - 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \ - 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ - 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 \ - ) -#endif +// #define num_args(...) \ +// num_args_impl( __VA_ARGS__, \ +// 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, \ +// 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, \ +// 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, \ +// 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, \ +// 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, \ +// 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ +// 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ +// 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \ +// 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \ +// 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ +// 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 \ +// ) +// // #endif // Stringizing #define stringize_va( ... ) #__VA_ARGS__ diff --git a/project/helpers/helper.hpp b/project/helpers/helper.hpp index 890adf3..3913d3b 100644 --- a/project/helpers/helper.hpp +++ b/project/helpers/helper.hpp @@ -61,7 +61,7 @@ CodeBody gen_ecode( char const* path ) CodeBody gen_eoperator( char const* path ) { - char scratch_mem[kilobytes(1)]; + char scratch_mem[kilobytes(4)]; Arena scratch = Arena::init_from_memory( scratch_mem, sizeof(scratch_mem) ); file_read_contents( scratch, zero_terminate, path ); @@ -116,7 +116,7 @@ CodeBody gen_eoperator( char const* path ) CodeBody gen_especifier( char const* path ) { - char scratch_mem[kilobytes(1)]; + char scratch_mem[kilobytes(4)]; Arena scratch = Arena::init_from_memory( scratch_mem, sizeof(scratch_mem) ); file_read_contents( scratch, zero_terminate, path ); diff --git a/project/meson.build b/project/meson.build deleted file mode 100644 index a9b2d09..0000000 --- a/project/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -project( 'gencpp_bootstrap', 'c', 'cpp', default_options : ['buildtype=debug'] ) - -includes = include_directories( -[ -'../project', -]) - -sources = [ 'gen.bootstrap.cpp' ] - -if get_option('buildtype').startswith('debug') - - add_project_arguments('-DBuild_Debug', language : ['c', 'cpp']) - -endif - -add_project_arguments('-DGEN_TIME', language : ['c', 'cpp']) - -executable( 'gencpp_bootstrap', sources, include_directories : includes ) diff --git a/scripts/Readme.md b/scripts/Readme.md index a4aee11..cbb5d08 100644 --- a/scripts/Readme.md +++ b/scripts/Readme.md @@ -27,13 +27,18 @@ IF they are changed the following files would need adjustment: **`clean.ps1`** Remove any generated content from the repository. -**`bootstrap.ps1`** -Generate a version of gencpp where components are inlined directly to `gen.` and `gen. ` -Any heavily preprocessed code is not inlined and are instead generated using the code in the `helpers` directory. +**`build.ps1`** +Build bootstrap, singleheader, or tests. Supports MSVC or clang, release or debug. -**`singleheader.ps1`** -Generate a single-header version of the library where all code that would normally good in the usual four files (see bootstrap) are inlined into a single `gen.hpp` file. -As with the bootstrap, any heavily preprocessed code is not inlined and instead generated with helper code. +``` +args: + bootstrap + singleheader + test + clang + msvc + release +``` **`test.gen.build.ps1`** Build the metaprogram for generating the test code. @@ -46,3 +51,6 @@ Build and run metaprogram, build test program. **`test.run.ps1`** Build and run metaprogram, build and run test program. + + +*Note: My env is Windows 11 with MSVC 2022 and clang 16.0.6* diff --git a/scripts/bootstrap.ci.ps1 b/scripts/bootstrap.ci.ps1 deleted file mode 100644 index 5a8bdd4..0000000 --- a/scripts/bootstrap.ci.ps1 +++ /dev/null @@ -1,78 +0,0 @@ -[string] $type = $null -[string] $test = $false - -foreach ( $arg in $args ) -{ - if ( $arg -eq "test" ) - { - $test = $true - } - else - { - $type = $arg - } -} - -$path_root = git rev-parse --show-toplevel -$path_project = Join-Path $path_root project -$path_project_build = Join-Path $path_project build -$path_project_gen = Join-Path $path_project gen - -write-host "`n`nBuilding gencpp bootstrap`n" - -if ( -not( Test-Path $path_project_build) ) -{ -# Generate build files for bootstrap -Push-Location $path_project - $args_meson = @() - $args_meson += "setup" - $args_meson += $path_project_build - - & meson $args_meson -Pop-Location -} - -# Compile bootstrap -Push-Location $path_root - $args_ninja = @() - $args_ninja += "-C" - $args_ninja += $path_project_build - - & ninja $args_ninja -Pop-Location - -Push-location $path_project - if ( -not(Test-Path($path_project_gen) )) { - New-Item -ItemType Directory -Path $path_project_gen - } - - # Run bootstrap - $gencpp_bootstrap = Join-Path $path_project_build gencpp_bootstrap.exe - - Write-Host `nRunning gencpp bootstrap... - & $gencpp_bootstrap - - # Format generated gencpp - Write-Host `nBeginning format... - $formatParams = @( - '-i' # In-place - '-style=file:../scripts/.clang-format' - '-verbose' - ) - - $include = @( - 'gen.hpp', 'gen.cpp', - 'gen.dep.hpp', 'gen.dep.cpp', - 'gen.builder.hpp', 'gen.builder.cpp' - 'gen.scanner.hpp', 'gen.scanner.cpp' - ) - $exclude = $null - - $targetFiles = @(Get-ChildItem -Recurse -Path $path_project_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) - - clang-format $formatParams $targetFiles - Write-Host "`nFormatting complete" -Pop-Location - -# Build and run validation - diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 deleted file mode 100644 index 0819482..0000000 --- a/scripts/bootstrap.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -cls -Invoke-Expression "& $(Join-Path $PSScriptRoot 'bootstrap.ci.ps1') $args" diff --git a/scripts/build.ps1 b/scripts/build.ps1 new file mode 100644 index 0000000..d3aef76 --- /dev/null +++ b/scripts/build.ps1 @@ -0,0 +1,367 @@ +Import-Module ./helpers/target_arch.psm1 + +cls + +#region Arguments + $compiler = $null +[bool] $release = $false +[bool] $bootstrap = $false +[bool] $singleheader = $false +[bool] $tests = $false + +[array] $compilers = @( "clang", "gcc", "msvc" ) + +# This is a really lazy way of parsing the args, could use actual params down the line... + +if ( $args ) { $args | ForEach-Object { + switch ($_){ + { $_ -in $compilers } { $compiler = $_; break } + "release" { $release = $true } + "bootstrap" { $bootstrap = $true } + "singleheader" { $singleheader = $true } + "tests" { $tests = $true } + } +}} +#endregion Arguments + +#region Building +write-host "Building gencpp with $compiler" + +Invoke-Expression "& $(join-path $PSScriptRoot 'helpers/devshell.ps1') -arch x64" + +$path_root = git rev-parse --show-toplevel +$path_build = Join-Path $path_root build +$path_project = Join-Path $path_root project +$path_scripts = Join-Path $path_root scripts +$path_singleheader = Join-Path $path_root singleheader +$path_test = Join-Path $path_root test + +write-host "Build Type: $(if ($release) {"Release"} else {"Debug"} )" + +if ( $compiler -eq $null ) { + write-host "No compilier specified, assuming clang available" + $compiler = "clang" +} + +Push-Location $path_root + +function run-compiler +{ + param( $compiler, $executable, $path_build, $path_gen, $compiler_args ) + + write-host "`nBuilding $executable" + write-host "Compiler config:" + $compiler_args | ForEach-Object { + write-host $_ -ForegroundColor Cyan + } + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + + $time_taken = Measure-Command { + & $compiler $compiler_args + | ForEach-Object { + $color = 'White' + switch ($_){ + { $_ -match "error" } { $color = 'Red' ; break } + { $_ -match "warning" } { $color = 'Yellow'; break } + } + write-host `t $_ -ForegroundColor $color + } + } + write-host "$executable built in $($time_taken.TotalMilliseconds) ms" +} + +if ( $compiler -match "clang" ) +{ + $target_arch = Get-TargetArchClang + + $flag_compile_only = '-c' + $flag_debug = '-g' + $flag_debug_codeview = '-gcodeview' + $flag_define = '-D' + $flag_include = '-I' + $flag_library = '-l' + $flag_library_path = '-L' + $flag_path_output = '-o' + $flag_preprocess_non_intergrated = '-no-integrated-cpp' + $flag_profiling_debug = '-fdebug-info-for-profiling' + $flag_target_arch = '-target' + $flag_x_linker = '-Xlinker' + $flag_machine_32 = '/machine:X64' + $flag_machine_64 = '/machine:X64' + $flag_win_linker = '-Wl,' + $flag_win_subsystem_console = '/SUBSYSTEM:CONSOLE' + $flag_win_machine_32 = '/MACHINE:X86' + $flag_win_machine_64 = '/MACHINE:X64' + + # $library_paths = @( + # 'C:\Windows\System32' + + # ) + + if ( $bootstrap ) + { + $path_build = join-path $path_project build + $path_gen = join-path $path_project gen + + $include = $path_project + $unit = join-path $path_project "bootstrap.cpp" + $executable = join-path $path_build "bootstrap.exe" + + $compiler_args = @( + $flag_target_arch, $target_arch, + $flag_preprocess_non_intergrated, + $( $flag_define + 'GEN_TIME' ), + $flag_path_output, $executable, + $( $flag_include + $include ) + ) + if ( $release -eq $false ) { + $compiler_args += $( $flag_define + 'Build_Debug' ) + $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug + } + + $linker_args = @( + $flag_x_linker, + # $( $flag_linker + $flag_win_subsystem_console ), + $( $flag_linker + $flag_machine_64 ) + ) + $libraries = @( + 'Kernel32', # For Windows API + # 'msvcrt', # For the C Runtime (Dynamically Linked) + 'libucrt', + 'libcmt' # For the C Runtime (Static Linkage) + ) + $compiler_args += $linker_args + $compiler_args += $libraries | ForEach-Object { $flag_library + $_ } + + $compiler_args += $unit + run-compiler clang $executable $path_build $path_gen $compiler_args + + Push-Location $path_project + if ( Test-Path($executable) ) { + write-host "`nRunning bootstrap" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $singleheader ) + { + $path_build = join-path $path_singleheader build + $path_gen = join-path $path_singleheader gen + + $include = $path_project + $unit = join-path $path_singleheader "singleheader.cpp" + $executable = join-path $path_build "singleheader.exe" + + $compiler_args = @( + $flag_target_arch, $target_arch, + $flag_preprocess_non_intergrated, + $( $flag_define + 'GEN_TIME' ), + $flag_path_output, $executable, + $( $flag_include + $include ) + ) + if ( $release -eq $false ) { + $compiler_args += $( $flag_define + 'Build_Debug' ) + $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug + } + + $compiler_args += $unit + run-compiler clang $executable $path_build $path_gen $compiler_args + + Push-Location $path_singleheader + if ( Test-Path($executable) ) { + write-host "`nRunning singleheader generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $test ) + { + # ... [your test compilation code here] + } +} + +if ( $compiler -match "msvc" ) +{ + $flag_debug = '/Zi' + $flag_define = '/D' + $flag_include = '/I' + $flag_full_src_path = '/FC' + $flag_nologo = '/nologo' + $flag_linker = '/link' + $flag_out_name = '/OUT:' + $flag_path_interm = '/Fo' + $flag_path_debug = '/Fd' + $flag_path_output = '/Fe' + $flag_preprocess_conform = '/Zc:preprocessor' + + [array] $compiler_args = $null + + if ( $bootstrap ) + { + $path_build = join-path $path_project build + $path_gen = join-path $path_project gen + + $include = $path_project + $unit = join-path $path_project "bootstrap.cpp" + $executable = join-path $path_build "bootstrap.exe" + + + $compiler_args = @( + $flag_nologo, + $flag_debug, + $flag_preprocess_conform, + $( $flag_define + 'GEN_TIME' ), + $flag_full_src_path, + $( $flag_path_interm + $path_build + '\' ), + $( $flag_path_output + $path_build + '\' ), + $( $flag_include + $include ) + ) + + if ( $release -eq $false ) { + $compiler_args += $( $flag_define + 'Build_Debug' ) + $compiler_args += $( $flag_path_debug + $path_build + '\' ) + } + + $compiler_args += $unit + run-compiler cl $executable $path_build $path_gen $compiler_args + + Push-Location $path_project + if ( Test-Path($executable) ) { + write-host "`nRunning bootstrap" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $singleheader ) + { + $path_build = join-path $path_singleheader build + $path_gen = join-path $path_singleheader gen + + $include = $path_project + $unit = join-path $path_singleheader "singleheader.cpp" + $executable = join-path $path_build "singleheader.exe" + + $compiler_args = @( + $flag_nologo, + $flag_debug, + $flag_preprocess_conform, + $( $flag_define + 'GEN_TIME' ), + $flag_full_src_path, + $( $flag_path_interm + $path_build + '\' ), + $( $flag_path_output + $path_build + '\' ), + $( $flag_include + $include ) + ) + + if ( $release -eq $false ) { + $compiler_args += $( $flag_define + 'Build_Debug' ) + $compiler_args += $( $flag_path_debug + $path_build + '\' ) + } + + $compiler_args += $unit + run-compiler cl $executable $path_build $path_gen $compiler_args + + Push-Location $path_singleheader + if ( Test-Path($executable) ) { + write-host "`nRunning singleheader generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $test ) + { + + } +} +#pragma endregion Building + +#pragma region Formatting +if ( $bootstrap -and (Test-Path (Join-Path $path_project "gen/gen.hpp")) ) +{ + $path_gen = join-path $path_project gen + + # Format generated gencpp + Write-Host "`nBeginning format" + $formatParams = @( + '-i' # In-place + '-style=file:./scripts/.clang-format' + '-verbose' + ) + + $include = @( + 'gen.hpp', 'gen.cpp', + 'gen.dep.hpp', 'gen.dep.cpp', + 'gen.builder.hpp', 'gen.builder.cpp' + 'gen.scanner.hpp', 'gen.scanner.cpp' + ) + $exclude = $null + + $targetFiles = @(Get-ChildItem -Recurse -Path $path_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) + + $time_taken = Measure-Command { + clang-format $formatParams $targetFiles + } + Write-Host "`nFormatting complete in $($time_taken.TotalMilliseconds) ms" +} + +if ( $singleheader ) +{ + $path_gen = join-path $path_singleheader gen + + # Format generated gencpp + Write-Host "`nBeginning format" + $formatParams = @( + '-i' # In-place + '-style=file:./scripts/.clang-format' + '-verbose' + ) + + $include = @( + 'gen.hpp' + ) + $exclude = $null + + $targetFiles = @(Get-ChildItem -Recurse -Path $path_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) + + $time_taken = Measure-Command { + clang-format $formatParams $targetFiles + } + Write-Host "`nFormatting complete in $($time_taken.TotalMilliseconds) ms" +} + +if ( $test ) +{ + +} +#pragma endregion Formatting + +Pop-Location # $path_root diff --git a/scripts/msvc/devshell.ps1 b/scripts/helpers/devshell.ps1 similarity index 81% rename from scripts/msvc/devshell.ps1 rename to scripts/helpers/devshell.ps1 index 531bdfa..ed6c203 100644 --- a/scripts/msvc/devshell.ps1 +++ b/scripts/helpers/devshell.ps1 @@ -1,3 +1,8 @@ +param ( + [ValidateSet("x64", "x86", "arm", "arm64")] + [string]$arch = "x64" +) + $ErrorActionPreference = "Stop" # Use vswhere to find the latest Visual Studio installation @@ -17,6 +22,9 @@ if ( -not (Test-Path $vs_devshell) ) { exit 1 } +# Set the target architecture based on the parameter +$env:VSCMD_ARG_TGT_ARCH=$arch + # Launch the Visual Studio Developer Shell Push-Location & $vs_devshell @args diff --git a/scripts/helpers/target_arch.psm1 b/scripts/helpers/target_arch.psm1 new file mode 100644 index 0000000..e6d388b --- /dev/null +++ b/scripts/helpers/target_arch.psm1 @@ -0,0 +1,25 @@ +# target_arch.psm1 + +function Get-TargetArchClang { + # Get the target architecture by querying clang itself + $output = & clang -v 2>&1 + foreach ($line in $output) { + if ($line -like "*Target:*") { + $clangTarget = ($line -split ':')[1].Trim() + return $clangTarget + } + } + throw "Clang target architecture could not be determined." +} + +function Get-TargetArchMSVC { + # Assuming you've set the Visual Studio environment variables using `vcvarsall.bat` + # This looks for the `VSCMD_ARG_TGT_ARCH` environment variable which Visual Studio sets to indicate the target architecture. + $arch = $env:VSCMD_ARG_TGT_ARCH + if (-not $arch) { + throw "MSVC target architecture could not be determined. Ensure you've initialized the Visual Studio environment." + } + return $arch +} + +Export-ModuleMember -Function Get-TargetArchClang, Get-TargetArchMSVC diff --git a/scripts/msvc/build_msvc.ps1 b/scripts/msvc/build_msvc.ps1 deleted file mode 100644 index fc69ddb..0000000 --- a/scripts/msvc/build_msvc.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -cls - -if ( -not( Test-Path $path_build ) ) { - New-Item -ItemType Directory -Path $path_build | Out-Null -} -if ( -not( Test-Path $path_build_interm ) ) { - New-Item -ItemType Directory -Path $path_build_interm | Out-Null -} - -$path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_gen = Join-Path $path_test gen -$path_gen_build = Join-Path $path_gen build -$path_scripts = Join-Path $path_root scripts -$path_test = Join-Path $path_root test -$path_test_build = Join-Path $path_test build diff --git a/scripts/singleheader.ci.ps1 b/scripts/singleheader.ci.ps1 deleted file mode 100644 index 0c1ec49..0000000 --- a/scripts/singleheader.ci.ps1 +++ /dev/null @@ -1,73 +0,0 @@ -[string] $type = $null -[string] $test = $false - -foreach ( $arg in $args ) -{ - if ( $arg -eq "test" ) - { - $test = $true - } - else - { - $type = $arg - } -} - -$path_root = git rev-parse --show-toplevel -$path_singleheader = Join-Path $path_root singleheader -$path_singleheader_build = Join-Path $path_singleheader build -$path_singleheader_gen = Join-Path $path_singleheader gen - -write-host "`n`nBuilding gencpp singleheader`n" - -if ( -not( Test-Path $path_singleheader_build) ) -{ -# Generate build files for meta-program -Push-Location $path_singleheader - $args_meson = @() - $args_meson += "setup" - $args_meson += $path_singleheader_build - - & meson $args_meson -Pop-Location -} - -# Compile meta-program -Push-Location $path_root - $args_ninja = @() - $args_ninja += "-C" - $args_ninja += $path_singleheader_build - - & ninja $args_ninja -Pop-Location - -Push-location $path_singleheader - if ( -not(Test-Path($path_singleheader_gen) )) { - New-Item -ItemType Directory -Path $path_singleheader_gen - } - - # Run meta-program - $gencpp_singleheader = Join-Path $path_singleheader_build gencpp_singleheader.exe - - Write-Host `nRunning gencpp singleheader... - & $gencpp_singleheader - - # Format generated files - Write-Host `nBeginning format... - $formatParams = @( - '-i' # In-place - '-style=file:../scripts/.clang-format' - '-verbose' - ) - - $include = @('gen.hpp') - $exclude = $null - - $targetFiles = @(Get-ChildItem -Recurse -Path $path_project -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) - - clang-format $formatParams $targetFiles - Write-Host "`nFormatting complete" -Pop-Location - -# Build and run validation - diff --git a/scripts/singleheader.ps1 b/scripts/singleheader.ps1 deleted file mode 100644 index 4e1c249..0000000 --- a/scripts/singleheader.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -cls -Invoke-Expression "& $(Join-Path $PSScriptRoot 'singleheader.ci.ps1') $args" diff --git a/singleheader/meson.build b/singleheader/meson.build deleted file mode 100644 index 828f1ae..0000000 --- a/singleheader/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -project( 'gencpp_singleheader', 'c', 'cpp', default_options : ['buildtype=debug'] ) - -includes = include_directories( -[ -'../project', -]) - -sources = [ 'gen.singleheader.cpp' ] - -if get_option('buildtype').startswith('debug') - - add_project_arguments('-DBuild_Debug', language : ['c', 'cpp']) - -endif - -add_project_arguments('-DGEN_TIME', language : ['c', 'cpp']) - -executable( 'gencpp_singleheader', sources, include_directories : includes ) diff --git a/singleheader/gen.singleheader.cpp b/singleheader/singleheader.cpp similarity index 100% rename from singleheader/gen.singleheader.cpp rename to singleheader/singleheader.cpp From 8985f0a4d99f0a8c00dfb51c377f50783c71e6ba Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 19 Aug 2023 17:08:13 -0400 Subject: [PATCH 03/10] MSVC in latest script works Clang is having issues. --- project/components/ast.cpp | 2 +- project/dependencies/macros.hpp | 8 +- scripts/build.ps1 | 176 +++++++++++++++++++++++--------- scripts/helpers/devshell.ps1 | 8 +- 4 files changed, 140 insertions(+), 54 deletions(-) diff --git a/project/components/ast.cpp b/project/components/ast.cpp index 810c50c..e6f238a 100644 --- a/project/components/ast.cpp +++ b/project/components/ast.cpp @@ -59,7 +59,7 @@ String AST::to_string() } index++; - str_copy( line, Content + curr, length ); + str_copy( line, (char const*)Content + curr, length ); result.append_fmt( "//%.*s", length, line ); mem_set( line, 0, MaxCommentLineLength); diff --git a/project/dependencies/macros.hpp b/project/dependencies/macros.hpp index 9eba24d..61d08c0 100644 --- a/project/dependencies/macros.hpp +++ b/project/dependencies/macros.hpp @@ -73,8 +73,10 @@ ) // #else +// This doesn't work on latest msvc so I had to use /Zc:preprocessor flag. + // Supports 1-50 arguments -// #define num_args_impl( \ +// #define num_args_impl( \ // _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \ // _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \ // _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \ @@ -88,7 +90,7 @@ // N, ... \ // ) N -// #define num_args(...) \ +// #define num_args(...) \ // num_args_impl( __VA_ARGS__, \ // 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, \ // 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, \ @@ -102,7 +104,7 @@ // 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ // 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 \ // ) -// // #endif +// #endif // Stringizing #define stringize_va( ... ) #__VA_ARGS__ diff --git a/scripts/build.ps1 b/scripts/build.ps1 index d3aef76..813b6c1 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1,15 +1,19 @@ +# This build script was written to build on windows, however I did setup some generalization to allow for cross platform building. +# It will most likely need a partial rewrite to segment the build process into separate script invocations based on the OS. +# That or just rewrite it in an sh script and call it a day. + Import-Module ./helpers/target_arch.psm1 cls #region Arguments - $compiler = $null -[bool] $release = $false -[bool] $bootstrap = $false -[bool] $singleheader = $false -[bool] $tests = $false + $compiler = $null +[bool] $release = $false +[bool] $bootstrap = $false +[bool] $singleheader = $false +[bool] $tests = $false -[array] $compilers = @( "clang", "gcc", "msvc" ) +[array] $compilers = @( "clang", "msvc" ) # This is a really lazy way of parsing the args, could use actual params down the line... @@ -27,7 +31,9 @@ if ( $args ) { $args | ForEach-Object { #region Building write-host "Building gencpp with $compiler" -Invoke-Expression "& $(join-path $PSScriptRoot 'helpers/devshell.ps1') -arch x64" +if ( $IsWindows ) { + Invoke-Expression "& $(join-path $PSScriptRoot 'helpers/devshell.ps1')" +} $path_root = git rev-parse --show-toplevel $path_build = Join-Path $path_root build @@ -47,21 +53,14 @@ Push-Location $path_root function run-compiler { - param( $compiler, $executable, $path_build, $path_gen, $compiler_args ) + param( $compiler, $unit, $compiler_args ) - write-host "`nBuilding $executable" + write-host "`Compiling $unit" write-host "Compiler config:" $compiler_args | ForEach-Object { write-host $_ -ForegroundColor Cyan } - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - $time_taken = Measure-Command { & $compiler $compiler_args | ForEach-Object { @@ -73,31 +72,70 @@ function run-compiler write-host `t $_ -ForegroundColor $color } } - write-host "$executable built in $($time_taken.TotalMilliseconds) ms" + + if ( Test-Path($unit) ) { + write-host "$unit compile finished in $($time_taken.TotalMilliseconds) ms" + } + else { + write-host "Compile failed for $unit" -ForegroundColor Red + } +} + +function run-linker +{ + param( $linker, $binary, $linker_args ) + + write-host "`Linking $binary" + write-host "Linker config:" + $linker_args | ForEach-Object { + write-host $_ -ForegroundColor Cyan + } + + $time_taken = Measure-Command { + & $linker $linker_args + | ForEach-Object { + $color = 'White' + switch ($_){ + { $_ -match "error" } { $color = 'Red' ; break } + { $_ -match "warning" } { $color = 'Yellow'; break } + } + write-host `t $_ -ForegroundColor $color + } + } + + if ( Test-Path($binary) ) { + write-host "$binary linking finished in $($time_taken.TotalMilliseconds) ms" + } + else { + write-host "Linking failed for $binary" -ForegroundColor Red + } } if ( $compiler -match "clang" ) { $target_arch = Get-TargetArchClang - $flag_compile_only = '-c' + $flag_compile = '-c' $flag_debug = '-g' $flag_debug_codeview = '-gcodeview' $flag_define = '-D' $flag_include = '-I' $flag_library = '-l' $flag_library_path = '-L' + $flag_link_win = '-Wl,' + $flag_link_win_subsystem_console = '/SUBSYSTEM:CONSOLE' + $flag_link_win_machine_32 = '/MACHINE:X86' + $flag_link_win_machine_64 = '/MACHINE:X64' + $flag_link_win_debug = '/DEBUG' + $flag_link_win_pdb = '/PDB:' + $flag_no_optimization = '-O0' $flag_path_output = '-o' $flag_preprocess_non_intergrated = '-no-integrated-cpp' $flag_profiling_debug = '-fdebug-info-for-profiling' $flag_target_arch = '-target' $flag_x_linker = '-Xlinker' - $flag_machine_32 = '/machine:X64' - $flag_machine_64 = '/machine:X64' - $flag_win_linker = '-Wl,' - $flag_win_subsystem_console = '/SUBSYSTEM:CONSOLE' - $flag_win_machine_32 = '/MACHINE:X86' - $flag_win_machine_64 = '/MACHINE:X64' + $flag_wall = '-Wall' + $flag_win_nologo = '/nologo' # $library_paths = @( # 'C:\Windows\System32' @@ -111,10 +149,12 @@ if ( $compiler -match "clang" ) $include = $path_project $unit = join-path $path_project "bootstrap.cpp" + $object = join-path $path_build "bootstrap.o" $executable = join-path $path_build "bootstrap.exe" $compiler_args = @( $flag_target_arch, $target_arch, + $flag_wall, $flag_preprocess_non_intergrated, $( $flag_define + 'GEN_TIME' ), $flag_path_output, $executable, @@ -125,9 +165,12 @@ if ( $compiler -match "clang" ) $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug } + $compiler_args += $flag_compile, $unit + run-compiler clang++ $executable $path_build $path_gen $compiler_args + $linker_args = @( $flag_x_linker, - # $( $flag_linker + $flag_win_subsystem_console ), + $( $flag_linker + $flag_win_subsystem_console ), $( $flag_linker + $flag_machine_64 ) ) $libraries = @( @@ -136,11 +179,9 @@ if ( $compiler -match "clang" ) 'libucrt', 'libcmt' # For the C Runtime (Static Linkage) ) - $compiler_args += $linker_args - $compiler_args += $libraries | ForEach-Object { $flag_library + $_ } - $compiler_args += $unit - run-compiler clang $executable $path_build $path_gen $compiler_args + # $compiler_args += $linker_args + # $compiler_args += $libraries | ForEach-Object { $flag_library + $_ } Push-Location $path_project if ( Test-Path($executable) ) { @@ -200,17 +241,29 @@ if ( $compiler -match "clang" ) if ( $compiler -match "msvc" ) { - $flag_debug = '/Zi' - $flag_define = '/D' - $flag_include = '/I' - $flag_full_src_path = '/FC' - $flag_nologo = '/nologo' - $flag_linker = '/link' - $flag_out_name = '/OUT:' - $flag_path_interm = '/Fo' - $flag_path_debug = '/Fd' - $flag_path_output = '/Fe' - $flag_preprocess_conform = '/Zc:preprocessor' + $flag_compile = '/c' + $flag_debug = '/Zi' + $flag_define = '/D' + $flag_include = '/I' + $flag_full_src_path = '/FC' + $flag_nologo = '/nologo' + $flag_dll = '/LD' + $flag_dll_debug = '/LDd' + $flag_linker = '/link' + $flag_link_machine_32 = '/MACHINE:X86' + $flag_link_machine_64 = '/MACHINE:X64' + $flag_link_path_output = '/OUT:' + $flag_link_rt_dll = '/MD' + $flag_link_rt_dll_debug = '/MDd' + $flag_link_rt_static = '/MT' + $flag_link_rt_static_debug = '/MTd' + $flag_link_subsystem_console = '/SUBSYSTEM:CONSOLE' + $flag_link_subsystem_windows = '/SUBSYSTEM:WINDOWS' + $flag_out_name = '/OUT:' + $flag_path_interm = '/Fo' + $flag_path_debug = '/Fd' + $flag_path_output = '/Fe' + $flag_preprocess_conform = '/Zc:preprocessor' [array] $compiler_args = $null @@ -219,11 +272,18 @@ if ( $compiler -match "msvc" ) $path_build = join-path $path_project build $path_gen = join-path $path_project gen + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + $include = $path_project $unit = join-path $path_project "bootstrap.cpp" + $object = join-path $path_build "bootstrap.obj" $executable = join-path $path_build "bootstrap.exe" - $compiler_args = @( $flag_nologo, $flag_debug, @@ -238,10 +298,27 @@ if ( $compiler -match "msvc" ) if ( $release -eq $false ) { $compiler_args += $( $flag_define + 'Build_Debug' ) $compiler_args += $( $flag_path_debug + $path_build + '\' ) + $compiler_args += $flag_link_rt_static_debug + } + else { + $compiler_args += $flag_link_rt_static } - $compiler_args += $unit - run-compiler cl $executable $path_build $path_gen $compiler_args + $compiler_args += $flag_compile, $unit + run-compiler cl $unit $compiler_args + + $linker_args = @( + $flag_nologo, + $flag_link_machine_64, + $flag_link_subsystem_console, + $( $flag_link_path_output + $executable ), + $object + ) + if ( $release -eq $false ) { + } + else { + } + run-linker link $executable $linker_args Push-Location $path_project if ( Test-Path($executable) ) { @@ -261,6 +338,13 @@ if ( $compiler -match "msvc" ) $path_build = join-path $path_singleheader build $path_gen = join-path $path_singleheader gen + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + $include = $path_project $unit = join-path $path_singleheader "singleheader.cpp" $executable = join-path $path_build "singleheader.exe" @@ -302,9 +386,9 @@ if ( $compiler -match "msvc" ) } } -#pragma endregion Building +#endregion Building -#pragma region Formatting +#region Formatting if ( $bootstrap -and (Test-Path (Join-Path $path_project "gen/gen.hpp")) ) { $path_gen = join-path $path_project gen @@ -362,6 +446,6 @@ if ( $test ) { } -#pragma endregion Formatting +#endregion Formatting Pop-Location # $path_root diff --git a/scripts/helpers/devshell.ps1 b/scripts/helpers/devshell.ps1 index ed6c203..1b602e5 100644 --- a/scripts/helpers/devshell.ps1 +++ b/scripts/helpers/devshell.ps1 @@ -1,6 +1,6 @@ param ( - [ValidateSet("x64", "x86", "arm", "arm64")] - [string]$arch = "x64" + [ValidateSet("amd64", "x86", "arm", "arm64")] + [string]$arch = "amd64" ) $ErrorActionPreference = "Stop" @@ -23,9 +23,9 @@ if ( -not (Test-Path $vs_devshell) ) { } # Set the target architecture based on the parameter -$env:VSCMD_ARG_TGT_ARCH=$arch +# $env:VSCMD_ARG_TGT_ARCH=$arch # Launch the Visual Studio Developer Shell Push-Location -& $vs_devshell @args +& $vs_devshell -Arch amd64 Pop-Location From 11679ba8b457d6251dbde4bdfd2970ff5014884b Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 19 Aug 2023 21:33:01 -0400 Subject: [PATCH 04/10] New build script works for clang and msvc! Need to update singleheader and test to use it. --- gencpp.vcxproj | 72 +++------------ project/components/ast.hpp | 2 +- scripts/build.ps1 | 170 ++++++++++++++++++++++------------- scripts/helpers/devshell.ps1 | 12 +-- 4 files changed, 123 insertions(+), 133 deletions(-) diff --git a/gencpp.vcxproj b/gencpp.vcxproj index 1167e0d..05ae9f2 100644 --- a/gencpp.vcxproj +++ b/gencpp.vcxproj @@ -112,16 +112,11 @@ + + + - - - - - - - - @@ -135,19 +130,6 @@ - - - - - - - - - - - - - @@ -157,19 +139,13 @@ - - - - - - - + @@ -186,18 +162,11 @@ + + - - - - - - - - - @@ -207,16 +176,6 @@ - - - - - - - - - - @@ -225,10 +184,9 @@ - - + @@ -242,21 +200,19 @@ - - - - - - + + + + + - - + + - diff --git a/project/components/ast.hpp b/project/components/ast.hpp index af5e014..5b8a9c5 100644 --- a/project/components/ast.hpp +++ b/project/components/ast.hpp @@ -214,7 +214,7 @@ struct AST - sizeof(ModuleFlag) - sizeof(u32) ) - / sizeof(SpecifierT) - 1; // -1 for 4 extra bytes + / sizeof(SpecifierT); // -1 for 4 extra bytes union { struct diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 813b6c1..16c13ea 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -3,6 +3,7 @@ # That or just rewrite it in an sh script and call it a day. Import-Module ./helpers/target_arch.psm1 +$devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' cls @@ -31,16 +32,18 @@ if ( $args ) { $args | ForEach-Object { #region Building write-host "Building gencpp with $compiler" -if ( $IsWindows ) { - Invoke-Expression "& $(join-path $PSScriptRoot 'helpers/devshell.ps1')" +if ($IsWindows) { + # This library was really designed to only run on 64-bit systems. + # (Its a development tool after all) + & $devshell -arch amd64 } $path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_project = Join-Path $path_root project -$path_scripts = Join-Path $path_root scripts -$path_singleheader = Join-Path $path_root singleheader -$path_test = Join-Path $path_root test +$path_build = Join-Path $path_root build +$path_project = Join-Path $path_root project +$path_scripts = Join-Path $path_root scripts +$path_singleheader = Join-Path $path_root singleheader +$path_test = Join-Path $path_root test write-host "Build Type: $(if ($release) {"Release"} else {"Debug"} )" @@ -62,15 +65,14 @@ function run-compiler } $time_taken = Measure-Command { - & $compiler $compiler_args - | ForEach-Object { - $color = 'White' - switch ($_){ - { $_ -match "error" } { $color = 'Red' ; break } - { $_ -match "warning" } { $color = 'Yellow'; break } - } - write-host `t $_ -ForegroundColor $color + & $compiler $compiler_args 2>&1 | ForEach-Object { + $color = 'White' + switch ($_){ + { $_ -match "error" } { $color = 'Red' ; break } + { $_ -match "warning" } { $color = 'Yellow'; break } } + write-host `t $_ -ForegroundColor $color + } } if ( Test-Path($unit) ) { @@ -92,15 +94,14 @@ function run-linker } $time_taken = Measure-Command { - & $linker $linker_args - | ForEach-Object { - $color = 'White' - switch ($_){ - { $_ -match "error" } { $color = 'Red' ; break } - { $_ -match "warning" } { $color = 'Yellow'; break } - } - write-host `t $_ -ForegroundColor $color + & $linker $linker_args 2>&1 | ForEach-Object { + $color = 'White' + switch ($_){ + { $_ -match "error" } { $color = 'Red' ; break } + { $_ -match "warning" } { $color = 'Yellow'; break } } + write-host `t $_ -ForegroundColor $color + } } if ( Test-Path($binary) ) { @@ -113,9 +114,10 @@ function run-linker if ( $compiler -match "clang" ) { - $target_arch = Get-TargetArchClang - + # https://clang.llvm.org/docs/ClangCommandLineReference.html $flag_compile = '-c' + $flag_color_diagnostics = '-fcolor-diagnostics' + $flag_no_color_diagnostics = '-fno-color-diagnostics' $flag_debug = '-g' $flag_debug_codeview = '-gcodeview' $flag_define = '-D' @@ -128,63 +130,95 @@ if ( $compiler -match "clang" ) $flag_link_win_machine_64 = '/MACHINE:X64' $flag_link_win_debug = '/DEBUG' $flag_link_win_pdb = '/PDB:' + $flag_link_win_path_output = '/OUT:' $flag_no_optimization = '-O0' $flag_path_output = '-o' $flag_preprocess_non_intergrated = '-no-integrated-cpp' $flag_profiling_debug = '-fdebug-info-for-profiling' $flag_target_arch = '-target' - $flag_x_linker = '-Xlinker' $flag_wall = '-Wall' + $flag_warning = '-W' + $flag_warning_as_error = '-Werror' $flag_win_nologo = '/nologo' - # $library_paths = @( - # 'C:\Windows\System32' + $ignore_warning_ms_include = 'no-microsoft-include' - # ) + $target_arch = Get-TargetArchClang + + $env:CLANG_FORCE_COLOR_DIAGNOSTICS = 1 if ( $bootstrap ) { $path_build = join-path $path_project build $path_gen = join-path $path_project gen + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + $include = $path_project $unit = join-path $path_project "bootstrap.cpp" - $object = join-path $path_build "bootstrap.o" + $object = join-path $path_build "bootstrap.obj" $executable = join-path $path_build "bootstrap.exe" + $warning_ignores = @( + $ignore_warning_ms_include + ) + $compiler_args = @( + $flag_no_color_diagnostics, $flag_target_arch, $target_arch, $flag_wall, $flag_preprocess_non_intergrated, - $( $flag_define + 'GEN_TIME' ), - $flag_path_output, $executable, - $( $flag_include + $include ) + ( $flag_define + 'GEN_TIME' ), + ( $flag_path_output + $object ), + ( $flag_include + $include ) ) + + $warning_ignores | ForEach-Object { + $compiler_args += $flag_warning + $_ + } + if ( $release -eq $false ) { - $compiler_args += $( $flag_define + 'Build_Debug' ) + $compiler_args += ( $flag_define + 'Build_Debug' ) $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug } $compiler_args += $flag_compile, $unit - run-compiler clang++ $executable $path_build $path_gen $compiler_args + run-compiler clang++ $unit $compiler_args $linker_args = @( - $flag_x_linker, - $( $flag_linker + $flag_win_subsystem_console ), - $( $flag_linker + $flag_machine_64 ) + $flag_link_win_subsystem_console, + $flag_link_win_machine_64, + $( $flag_link_win_path_output + $executable ) ) + if ( $release -eq $false ) { + $linker_args += $flag_link_win_debug + $linker_args += $flag_link_win_pdb + $pdb + } + else { + } + + # https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170 $libraries = @( - 'Kernel32', # For Windows API - # 'msvcrt', # For the C Runtime (Dynamically Linked) - 'libucrt', + 'Kernel32' # For Windows API + # 'msvcrt', # For the C Runtime (Dynamically Linked) + # 'libucrt', 'libcmt' # For the C Runtime (Static Linkage) ) - # $compiler_args += $linker_args - # $compiler_args += $libraries | ForEach-Object { $flag_library + $_ } + $libraries | ForEach-Object { + $linker_args += $_ + '.lib' + } + + $linker_args += $object + run-linker lld-link $executable $linker_args Push-Location $path_project - if ( Test-Path($executable) ) { + if ( Test-Path( $executable ) ) { write-host "`nRunning bootstrap" $time_taken = Measure-Command { & $executable | ForEach-Object { @@ -208,12 +242,12 @@ if ( $compiler -match "clang" ) $compiler_args = @( $flag_target_arch, $target_arch, $flag_preprocess_non_intergrated, - $( $flag_define + 'GEN_TIME' ), + ( $flag_define + 'GEN_TIME' ), $flag_path_output, $executable, - $( $flag_include + $include ) + ( $flag_include + $include ) ) if ( $release -eq $false ) { - $compiler_args += $( $flag_define + 'Build_Debug' ) + $compiler_args += ( $flag_define + 'Build_Debug' ) $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug } @@ -221,7 +255,7 @@ if ( $compiler -match "clang" ) run-compiler clang $executable $path_build $path_gen $compiler_args Push-Location $path_singleheader - if ( Test-Path($executable) ) { + if ( Test-Path( $executable ) ) { write-host "`nRunning singleheader generator" $time_taken = Measure-Command { & $executable | ForEach-Object { @@ -241,6 +275,7 @@ if ( $compiler -match "clang" ) if ( $compiler -match "msvc" ) { + # https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category?view=msvc-170 $flag_compile = '/c' $flag_debug = '/Zi' $flag_define = '/D' @@ -250,6 +285,8 @@ if ( $compiler -match "msvc" ) $flag_dll = '/LD' $flag_dll_debug = '/LDd' $flag_linker = '/link' + $flag_link_debug = '/DEBUG' + $flag_link_pdb = '/PDB:' $flag_link_machine_32 = '/MACHINE:X86' $flag_link_machine_64 = '/MACHINE:X64' $flag_link_path_output = '/OUT:' @@ -266,6 +303,7 @@ if ( $compiler -match "msvc" ) $flag_preprocess_conform = '/Zc:preprocessor' [array] $compiler_args = $null + [array] $linker_args = $null if ( $bootstrap ) { @@ -283,21 +321,22 @@ if ( $compiler -match "msvc" ) $unit = join-path $path_project "bootstrap.cpp" $object = join-path $path_build "bootstrap.obj" $executable = join-path $path_build "bootstrap.exe" + $pdb = join-path $path_build "bootstrap.pdb" $compiler_args = @( $flag_nologo, - $flag_debug, $flag_preprocess_conform, - $( $flag_define + 'GEN_TIME' ), + $flag_define + 'GEN_TIME', $flag_full_src_path, - $( $flag_path_interm + $path_build + '\' ), - $( $flag_path_output + $path_build + '\' ), - $( $flag_include + $include ) + ( $flag_path_interm + $path_build + '\' ), + ( $flag_path_output + $path_build + '\' ), + ( $flag_include + $include ) ) if ( $release -eq $false ) { - $compiler_args += $( $flag_define + 'Build_Debug' ) - $compiler_args += $( $flag_path_debug + $path_build + '\' ) + $compiler_args += ( $flag_define + 'Build_Debug' ) + $compiler_args += $flag_debug + $compiler_args += ( $flag_path_debug + $path_build + '\' ) $compiler_args += $flag_link_rt_static_debug } else { @@ -311,17 +350,20 @@ if ( $compiler -match "msvc" ) $flag_nologo, $flag_link_machine_64, $flag_link_subsystem_console, - $( $flag_link_path_output + $executable ), - $object + ( $flag_link_path_output + $executable ) ) if ( $release -eq $false ) { + $linker_args += $flag_link_debug + $linker_args += $flag_link_pdb + $pdb } else { } + + $linker_args += $object run-linker link $executable $linker_args Push-Location $path_project - if ( Test-Path($executable) ) { + if ( Test-Path( $executable ) ) { write-host "`nRunning bootstrap" $time_taken = Measure-Command { & $executable | ForEach-Object { @@ -353,16 +395,16 @@ if ( $compiler -match "msvc" ) $flag_nologo, $flag_debug, $flag_preprocess_conform, - $( $flag_define + 'GEN_TIME' ), + ( $flag_define + 'GEN_TIME' ), $flag_full_src_path, - $( $flag_path_interm + $path_build + '\' ), - $( $flag_path_output + $path_build + '\' ), - $( $flag_include + $include ) + ( $flag_path_interm + $path_build + '\' ), + ( $flag_path_output + $path_build + '\' ), + ( $flag_include + $include ) ) if ( $release -eq $false ) { - $compiler_args += $( $flag_define + 'Build_Debug' ) - $compiler_args += $( $flag_path_debug + $path_build + '\' ) + $compiler_args += ( $flag_define + 'Build_Debug' ) + $compiler_args += ( $flag_path_debug + $path_build + '\' ) } $compiler_args += $unit diff --git a/scripts/helpers/devshell.ps1 b/scripts/helpers/devshell.ps1 index 1b602e5..3b97a0f 100644 --- a/scripts/helpers/devshell.ps1 +++ b/scripts/helpers/devshell.ps1 @@ -1,8 +1,3 @@ -param ( - [ValidateSet("amd64", "x86", "arm", "arm64")] - [string]$arch = "amd64" -) - $ErrorActionPreference = "Stop" # Use vswhere to find the latest Visual Studio installation @@ -22,10 +17,7 @@ if ( -not (Test-Path $vs_devshell) ) { exit 1 } -# Set the target architecture based on the parameter -# $env:VSCMD_ARG_TGT_ARCH=$arch - # Launch the Visual Studio Developer Shell Push-Location -& $vs_devshell -Arch amd64 -Pop-Location +& $vs_devshell @args +Pop-Location \ No newline at end of file From 37d9782cf2062877e935aae6e1b83a04e286bfd4 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 20 Aug 2023 10:17:55 -0400 Subject: [PATCH 05/10] Singleheader now compiles with new build script on both clang & msvc --- project/components/ast.hpp | 2 +- scripts/build.ps1 | 95 ++++++++++++++++++++++++++++++-------- 2 files changed, 76 insertions(+), 21 deletions(-) diff --git a/project/components/ast.hpp b/project/components/ast.hpp index 5b8a9c5..af5e014 100644 --- a/project/components/ast.hpp +++ b/project/components/ast.hpp @@ -214,7 +214,7 @@ struct AST - sizeof(ModuleFlag) - sizeof(u32) ) - / sizeof(SpecifierT); // -1 for 4 extra bytes + / sizeof(SpecifierT) - 1; // -1 for 4 extra bytes union { struct diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 16c13ea..965f409 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -145,7 +145,17 @@ if ( $compiler -match "clang" ) $target_arch = Get-TargetArchClang - $env:CLANG_FORCE_COLOR_DIAGNOSTICS = 1 + $warning_ignores = @( + $ignore_warning_ms_include + ) + + # https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170 + $libraries = @( + 'Kernel32' # For Windows API + # 'msvcrt', # For the C Runtime (Dynamically Linked) + # 'libucrt', + 'libcmt' # For the C Runtime (Static Linkage) + ) if ( $bootstrap ) { @@ -163,10 +173,7 @@ if ( $compiler -match "clang" ) $unit = join-path $path_project "bootstrap.cpp" $object = join-path $path_build "bootstrap.obj" $executable = join-path $path_build "bootstrap.exe" - - $warning_ignores = @( - $ignore_warning_ms_include - ) + $pdb = join-path $path_build "bootstrap.pdb" $compiler_args = @( $flag_no_color_diagnostics, @@ -202,14 +209,6 @@ if ( $compiler -match "clang" ) else { } - # https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170 - $libraries = @( - 'Kernel32' # For Windows API - # 'msvcrt', # For the C Runtime (Dynamically Linked) - # 'libucrt', - 'libcmt' # For the C Runtime (Static Linkage) - ) - $libraries | ForEach-Object { $linker_args += $_ + '.lib' } @@ -235,15 +234,26 @@ if ( $compiler -match "clang" ) $path_build = join-path $path_singleheader build $path_gen = join-path $path_singleheader gen + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + $include = $path_project $unit = join-path $path_singleheader "singleheader.cpp" + $object = join-path $path_build "singleheader.obj" $executable = join-path $path_build "singleheader.exe" + $pdb = join-path $path_build "singleheader.pdb" $compiler_args = @( + $flag_no_color_diagnostics, $flag_target_arch, $target_arch, + $flag_wall, $flag_preprocess_non_intergrated, ( $flag_define + 'GEN_TIME' ), - $flag_path_output, $executable, + ( $flag_path_output + $object ), ( $flag_include + $include ) ) if ( $release -eq $false ) { @@ -251,8 +261,31 @@ if ( $compiler -match "clang" ) $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug } - $compiler_args += $unit - run-compiler clang $executable $path_build $path_gen $compiler_args + $warning_ignores | ForEach-Object { + $compiler_args += $flag_warning + $_ + } + + $compiler_args += $flag_compile, $unit + run-compiler clang $unit $compiler_args + + $linker_args = @( + $flag_link_win_subsystem_console, + $flag_link_win_machine_64, + $( $flag_link_win_path_output + $executable ) + ) + if ( $release -eq $false ) { + $linker_args += $flag_link_win_debug + $linker_args += $flag_link_win_pdb + $pdb + } + else { + } + + $libraries | ForEach-Object { + $linker_args += $_ + '.lib' + } + + $linker_args += $object + run-linker lld-link $executable $linker_args Push-Location $path_singleheader if ( Test-Path( $executable ) ) { @@ -389,12 +422,14 @@ if ( $compiler -match "msvc" ) $include = $path_project $unit = join-path $path_singleheader "singleheader.cpp" + $object = join-path $path_build "singleheader.obj" $executable = join-path $path_build "singleheader.exe" + $pdb = join-path $path_build "singleheader.pdb" $compiler_args = @( $flag_nologo, - $flag_debug, $flag_preprocess_conform, + $flag_debug, ( $flag_define + 'GEN_TIME' ), $flag_full_src_path, ( $flag_path_interm + $path_build + '\' ), @@ -405,10 +440,30 @@ if ( $compiler -match "msvc" ) if ( $release -eq $false ) { $compiler_args += ( $flag_define + 'Build_Debug' ) $compiler_args += ( $flag_path_debug + $path_build + '\' ) + $compiler_args += $flag_link_rt_static_debug + } + else { + $compiler_args += $flag_link_rt_static } - $compiler_args += $unit - run-compiler cl $executable $path_build $path_gen $compiler_args + $compiler_args += $flag_compile, $unit + run-compiler cl $unit $compiler_args + + $linker_args = @( + $flag_nologo, + $flag_link_machine_64, + $flag_link_subsystem_console, + ( $flag_link_path_output + $executable ) + ) + if ( $release -eq $false ) { + $linker_args += $flag_link_debug + $linker_args += $flag_link_pdb + $pdb + } + else { + } + + $linker_args += $object + run-linker link $executable $linker_args Push-Location $path_singleheader if ( Test-Path($executable) ) { @@ -459,7 +514,7 @@ if ( $bootstrap -and (Test-Path (Join-Path $path_project "gen/gen.hpp")) ) Write-Host "`nFormatting complete in $($time_taken.TotalMilliseconds) ms" } -if ( $singleheader ) +if ( $singleheader -and (Test-Path (Join-Path $path_singleheader "gen/gen.hpp")) ) { $path_gen = join-path $path_singleheader gen From a6bf60a51e655058505b3e1b48a8946396d76457 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 20 Aug 2023 12:31:24 -0400 Subject: [PATCH 06/10] Simpilication of build script, added initial support for tests --- .vscode/c_cpp_properties.json | 22 +- .vscode/launch.json | 4 +- gencpp.vcxproj | 6 - scripts/Readme.md | 19 +- scripts/build.ci.ps1 | 524 +++++++++++++++++++++++++++++++ scripts/build.ps1 | 549 +-------------------------------- scripts/helpers/devshell.ps1 | 2 +- scripts/package_release.ps1 | 19 +- scripts/test.gen_build.ci.ps1 | 45 --- scripts/test.gen_build.ps1 | 2 - scripts/test.gen_run.ps1 | 102 ------ test/SOA.cpp | 4 +- test/gen/meson.build | 27 -- test/meson.build | 25 -- test/sanity.cpp | 4 +- test/test.cpp | 4 +- test/test.singleheader_ast.cpp | 6 +- 17 files changed, 574 insertions(+), 790 deletions(-) create mode 100644 scripts/build.ci.ps1 delete mode 100644 scripts/test.gen_build.ci.ps1 delete mode 100644 scripts/test.gen_build.ps1 delete mode 100644 scripts/test.gen_run.ps1 delete mode 100644 test/gen/meson.build delete mode 100644 test/meson.build diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 8c69c10..b41b54d 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,7 +1,7 @@ { "configurations": [ { - "name": "Win32", + "name": "Win32 msvc", "includePath": [ "${workspaceFolder}/**" ], @@ -12,10 +12,24 @@ "GEN_TIME" ], "windowsSdkVersion": "10.0.19041.0", - // "compilerPath": "C:/Users/Ed/scoop/apps/llvm/current/bin/clang++.exe", - "compilerPath": "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe", + "compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe", "intelliSenseMode": "msvc-x64", - // "intelliSenseMode": "windows-clang-x64", + "compileCommands": "${workspaceFolder}/project/build/compile_commands.json" + }, + { + "name": "Win32 clang", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE", + "GEN_TIME" + ], + "windowsSdkVersion": "10.0.19041.0", + "compilerPath": "C:/Users/Ed/scoop/apps/llvm/current/bin/clang++.exe", + "intelliSenseMode": "windows-clang-x64", "compileCommands": "${workspaceFolder}/project/build/compile_commands.json" } ], diff --git a/.vscode/launch.json b/.vscode/launch.json index 0cde1a5..b9f0b72 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,7 @@ "type": "lldb", "request": "launch", "name": "Debug gentime lldb", - "program": "${workspaceFolder}/test/gen/build/gencpp.exe", + "program": "${workspaceFolder}/test/test.exe", "args": [], "cwd": "${workspaceFolder}/test/gen/", "postRunCommands": [ @@ -18,7 +18,7 @@ "type": "cppvsdbg", "request": "launch", "name": "Debug gentime vsdbg", - "program": "${workspaceFolder}/test/gen/build/gencpp.exe", + "program": "${workspaceFolder}/test/build/test.exe", "args": [], "cwd": "${workspaceFolder}/test/gen/", "visualizerFile": "${workspaceFolder}/scripts/gencpp.natvis" diff --git a/gencpp.vcxproj b/gencpp.vcxproj index 05ae9f2..9df2e76 100644 --- a/gencpp.vcxproj +++ b/gencpp.vcxproj @@ -103,10 +103,8 @@ - - @@ -206,13 +204,9 @@ - - - - diff --git a/scripts/Readme.md b/scripts/Readme.md index cbb5d08..0aac815 100644 --- a/scripts/Readme.md +++ b/scripts/Readme.md @@ -36,21 +36,12 @@ args: singleheader test clang - msvc - release + msvc : By default this project builds with clang, specifying msvc will build with MSVC. + debug + release : By default this project builds in debug mode, specifying release will build with optimizations. ``` -**`test.gen.build.ps1`** -Build the metaprogram for generating the test code. - -**`test.gen.ps1`** -Build (if not already) the metaprogram for generating test code, then run it to generate code. - -**`test.build.ps1`** -Build and run metaprogram, build test program. - -**`test.run.ps1`** -Build and run metaprogram, build and run test program. - +**`package_release.ps1`** +Will build the project as fast as possible, then package the release into a zip file. *Note: My env is Windows 11 with MSVC 2022 and clang 16.0.6* diff --git a/scripts/build.ci.ps1 b/scripts/build.ci.ps1 new file mode 100644 index 0000000..febd109 --- /dev/null +++ b/scripts/build.ci.ps1 @@ -0,0 +1,524 @@ +# This build script was written to build on windows, however I did setup some generalization to allow for cross platform building. +# It will most likely need a partial rewrite to segment the build process into separate script invocations based on the OS. +# That or just rewrite it in an sh script and call it a day. + +Import-Module ./helpers/target_arch.psm1 +$devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' + +cls + +#region Arguments + $compiler = $null + $release = $null +[bool] $bootstrap = $false +[bool] $singleheader = $false +[bool] $test = $false + +[array] $compilers = @( "clang", "msvc" ) + +# This is a really lazy way of parsing the args, could use actual params down the line... + +if ( $args ) { $args | ForEach-Object { + switch ($_){ + { $_ -in $compilers } { $compiler = $_; break } + "release" { $release = $true } + "debug" { $release = $false } + "bootstrap" { $bootstrap = $true } + "singleheader" { $singleheader = $true } + "test" { $test = $true } + } +}} +#endregion Arguments + +#region Building + +if ($IsWindows) { + # This library was really designed to only run on 64-bit systems. + # (Its a development tool after all) + & $devshell -arch amd64 +} + +$path_root = git rev-parse --show-toplevel +$path_build = Join-Path $path_root build +$path_project = Join-Path $path_root project +$path_scripts = Join-Path $path_root scripts +$path_singleheader = Join-Path $path_root singleheader +$path_test = Join-Path $path_root test + + +if ( $compiler -eq $null ) { + write-host "No compilier specified, assuming clang available" + $compiler = "clang" +} + +if ( $release -eq $null ) { + write-host "No build type specified, assuming debug" + $release = $false +} + +if ( $bootstrap -eq $false -and $singleheader -eq $false -and $test -eq $false ) { + throw "No build target specified. One must be specified, this script will not assume one" +} + +write-host "Building gencpp with $compiler" +write-host "Build Type: $(if ($release) {"Release"} else {"Debug"} )" + +Push-Location $path_root + +function run-compiler +{ + param( $compiler, $unit, $compiler_args ) + + write-host "`Compiling $unit" + write-host "Compiler config:" + $compiler_args | ForEach-Object { + write-host $_ -ForegroundColor Cyan + } + + $time_taken = Measure-Command { + & $compiler $compiler_args 2>&1 | ForEach-Object { + $color = 'White' + switch ($_){ + { $_ -match "error" } { $color = 'Red' ; break } + { $_ -match "warning" } { $color = 'Yellow'; break } + } + write-host `t $_ -ForegroundColor $color + } + } + + if ( Test-Path($unit) ) { + write-host "$unit compile finished in $($time_taken.TotalMilliseconds) ms" + } + else { + write-host "Compile failed for $unit" -ForegroundColor Red + } +} + +function run-linker +{ + param( $linker, $binary, $linker_args ) + + write-host "`Linking $binary" + write-host "Linker config:" + $linker_args | ForEach-Object { + write-host $_ -ForegroundColor Cyan + } + + $time_taken = Measure-Command { + & $linker $linker_args 2>&1 | ForEach-Object { + $color = 'White' + switch ($_){ + { $_ -match "error" } { $color = 'Red' ; break } + { $_ -match "warning" } { $color = 'Yellow'; break } + } + write-host `t $_ -ForegroundColor $color + } + } + + if ( Test-Path($binary) ) { + write-host "$binary linking finished in $($time_taken.TotalMilliseconds) ms" + } + else { + write-host "Linking failed for $binary" -ForegroundColor Red + } +} + +if ( $compiler -match "clang" ) +{ + # https://clang.llvm.org/docs/ClangCommandLineReference.html + $flag_compile = '-c' + $flag_color_diagnostics = '-fcolor-diagnostics' + $flag_no_color_diagnostics = '-fno-color-diagnostics' + $flag_debug = '-g' + $flag_debug_codeview = '-gcodeview' + $flag_define = '-D' + $flag_include = '-I' + $flag_library = '-l' + $flag_library_path = '-L' + $flag_link_win = '-Wl,' + $flag_link_win_subsystem_console = '/SUBSYSTEM:CONSOLE' + $flag_link_win_machine_32 = '/MACHINE:X86' + $flag_link_win_machine_64 = '/MACHINE:X64' + $flag_link_win_debug = '/DEBUG' + $flag_link_win_pdb = '/PDB:' + $flag_link_win_path_output = '/OUT:' + $flag_no_optimization = '-O0' + $flag_path_output = '-o' + $flag_preprocess_non_intergrated = '-no-integrated-cpp' + $flag_profiling_debug = '-fdebug-info-for-profiling' + $flag_target_arch = '-target' + $flag_wall = '-Wall' + $flag_warning = '-W' + $flag_warning_as_error = '-Werror' + $flag_win_nologo = '/nologo' + + $ignore_warning_ms_include = 'no-microsoft-include' + + $target_arch = Get-TargetArchClang + + $warning_ignores = @( + $ignore_warning_ms_include + ) + + # https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170 + $libraries = @( + 'Kernel32' # For Windows API + # 'msvcrt', # For the C Runtime (Dynamically Linked) + # 'libucrt', + 'libcmt' # For the C Runtime (Static Linkage) + ) + + function build-simple + { + param( $compiler, $linker, $includes, $unit, $executable ) + + $object = $executable -replace '\.exe', '.obj' + $pdb = $executable -replace '\.exe', '.pdb' + + $compiler_args = @( + $flag_no_color_diagnostics, + $flag_target_arch, $target_arch, + $flag_wall, + $flag_preprocess_non_intergrated, + ( $flag_define + 'GEN_TIME' ), + ( $flag_path_output + $object ), + ( $flag_include + $includes ) + ) + if ( $release -eq $false ) { + $compiler_args += ( $flag_define + 'Build_Debug' ) + $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug + $compiler_args += $flag_no_optimization + } + + $warning_ignores | ForEach-Object { + $compiler_args += $flag_warning + $_ + } + + $compiler_args += $flag_compile, $unit + run-compiler $compiler $unit $compiler_args + + $linker_args = @( + $flag_link_win_subsystem_console, + $flag_link_win_machine_64, + $( $flag_link_win_path_output + $executable ) + ) + if ( $release -eq $false ) { + $linker_args += $flag_link_win_debug + $linker_args += $flag_link_win_pdb + $pdb + } + else { + } + + $libraries | ForEach-Object { + $linker_args += $_ + '.lib' + } + + $linker_args += $object + run-linker $linker $executable $linker_args + } + + [array] $compiler_args = $null + [array] $linker_args = $null + + if ( $bootstrap ) + { + $path_build = join-path $path_project build + $path_gen = join-path $path_project gen + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + + $includes = @( $path_project ) + $unit = join-path $path_project "bootstrap.cpp" + $executable = join-path $path_build "bootstrap.exe" + + build-simple clang++ lld-link $include $unit $executable + + Push-Location $path_project + if ( Test-Path( $executable ) ) { + write-host "`nRunning bootstrap" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $singleheader ) + { + $path_build = join-path $path_singleheader build + $path_gen = join-path $path_singleheader gen + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + + $include = $path_project + $unit = join-path $path_singleheader "singleheader.cpp" + $executable = join-path $path_build "singleheader.exe" + + build-simple clang++ lld-link $include $unit $executable + + Push-Location $path_singleheader + if ( Test-Path( $executable ) ) { + write-host "`nRunning singleheader generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $test ) + { + # ... [your test compilation code here] + } +} + +if ( $compiler -match "msvc" ) +{ + # https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category?view=msvc-170 + $flag_compile = '/c' + $flag_debug = '/Zi' + $flag_define = '/D' + $flag_include = '/I' + $flag_full_src_path = '/FC' + $flag_nologo = '/nologo' + $flag_dll = '/LD' + $flag_dll_debug = '/LDd' + $flag_linker = '/link' + $flag_link_debug = '/DEBUG' + $flag_link_pdb = '/PDB:' + $flag_link_machine_32 = '/MACHINE:X86' + $flag_link_machine_64 = '/MACHINE:X64' + $flag_link_path_output = '/OUT:' + $flag_link_rt_dll = '/MD' + $flag_link_rt_dll_debug = '/MDd' + $flag_link_rt_static = '/MT' + $flag_link_rt_static_debug = '/MTd' + $flag_link_subsystem_console = '/SUBSYSTEM:CONSOLE' + $flag_link_subsystem_windows = '/SUBSYSTEM:WINDOWS' + $flag_no_optimization = '/Od' + $flag_out_name = '/OUT:' + $flag_path_interm = '/Fo' + $flag_path_debug = '/Fd' + $flag_path_output = '/Fe' + $flag_preprocess_conform = '/Zc:preprocessor' + + # This works because this project uses a single unit to build + function build-simple + { + param( $compiler, $linker, $includes, $unit, $executable ) + + $object = $executable -replace '\.exe', '.obj' + $pdb = $executable -replace '\.exe', '.pdb' + + $compiler_args = @( + $flag_nologo, + $flag_preprocess_conform, + $flag_debug, + ( $flag_define + 'GEN_TIME' ), + $flag_full_src_path, + ( $flag_path_interm + $path_build + '\' ), + ( $flag_path_output + $path_build + '\' ) + ) + if ( $release -eq $false ) { + $compiler_args += ( $flag_define + 'Build_Debug' ) + $compiler_args += ( $flag_path_debug + $path_build + '\' ) + $compiler_args += $flag_link_rt_static_debug + $compiler_args += $flag_no_optimization + } + else { + $compiler_args += $flag_link_rt_static + } + $compiler_args += $includes | ForEach-Object { $flag_include + $_ } + $compiler_args += $flag_compile, $unit + run-compiler $compiler $unit $compiler_args + + $linker_args = @( + $flag_nologo, + $flag_link_machine_64, + $flag_link_subsystem_console, + ( $flag_link_path_output + $executable ) + ) + if ( $release -eq $false ) { + $linker_args += $flag_link_debug + $linker_args += $flag_link_pdb + $pdb + } + else { + } + + $linker_args += $object + run-linker $linker $executable $linker_args + } + + [array] $compiler_args = $null + [array] $linker_args = $null + + if ( $bootstrap ) + { + $path_build = join-path $path_project build + $path_gen = join-path $path_project gen + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + + $includes = @( $path_project) + $unit = join-path $path_project "bootstrap.cpp" + $executable = join-path $path_build "bootstrap.exe" + + build-simple cl link $includes $unit $executable + + Push-Location $path_project + if ( Test-Path( $executable ) ) { + write-host "`nRunning bootstrap" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $singleheader ) + { + $path_build = join-path $path_singleheader build + $path_gen = join-path $path_singleheader gen + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + + $includes = @($path_project) + $unit = join-path $path_singleheader "singleheader.cpp" + $executable = join-path $path_build "singleheader.exe" + + build-simple cl link $includes $unit $executable + + Push-Location $path_singleheader + if ( Test-Path($executable) ) { + write-host "`nRunning singleheader generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } + + if ( $test ) + { + $path_gen = join-path $path_test gen + $path_gen_build = join-path $path_gen build + $path_build = join-path $path_test build + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + if ( -not(Test-Path($path_gen_build) )) { + New-Item -ItemType Directory -Path $path_gen_build + } + + $path_bootstrap = join-path $path_project gen + + $include = $path_bootstrap + $unit = join-path $path_test "test.cpp" + $object = join-path $path_build "test.obj" + $executable = join-path $path_build "test.exe" + $pdb = join-path $path_build "test.pdb" + + build-simple cl link $include $unit $executable + + Push-Location $path_test + if ( Test-Path( $executable ) ) { + write-host "`nRunning test generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nTest generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location + } +} +#endregion Building + +#region Formatting +function format-cpp +{ + param( $path, $include, $exclude ) + + # Format generated gencpp + Write-Host "`nBeginning format" + $formatParams = @( + '-i' # In-place + '-style=file:./scripts/.clang-format' + '-verbose' + ) + + $targetFiles = @(Get-ChildItem -Recurse -Path $path -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) + + $time_taken = Measure-Command { + clang-format $formatParams $targetFiles + } + Write-Host "`nFormatting complete in $($time_taken.TotalMilliseconds) ms" +} + +if ( $bootstrap -and (Test-Path (Join-Path $path_project "gen/gen.hpp")) ) +{ + $path_gen = join-path $path_project gen + $include = @( + 'gen.hpp', 'gen.cpp', + 'gen.dep.hpp', 'gen.dep.cpp', + 'gen.builder.hpp', 'gen.builder.cpp' + 'gen.scanner.hpp', 'gen.scanner.cpp' + ) + $exclude = $null + format-cpp $path_gen $include $exclude +} + +if ( $singleheader -and (Test-Path (Join-Path $path_singleheader "gen/gen.hpp")) ) +{ + $path_gen = join-path $path_singleheader gen + $include = @( + 'gen.hpp' + ) + $exclude = $null + format-cpp $path_gen $include $exclude +} + +if ( $test ) +{ + +} +#endregion Formatting + +Pop-Location # $path_root diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 965f409..349c629 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -1,548 +1,3 @@ -# This build script was written to build on windows, however I did setup some generalization to allow for cross platform building. -# It will most likely need a partial rewrite to segment the build process into separate script invocations based on the OS. -# That or just rewrite it in an sh script and call it a day. - -Import-Module ./helpers/target_arch.psm1 -$devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' - cls - -#region Arguments - $compiler = $null -[bool] $release = $false -[bool] $bootstrap = $false -[bool] $singleheader = $false -[bool] $tests = $false - -[array] $compilers = @( "clang", "msvc" ) - -# This is a really lazy way of parsing the args, could use actual params down the line... - -if ( $args ) { $args | ForEach-Object { - switch ($_){ - { $_ -in $compilers } { $compiler = $_; break } - "release" { $release = $true } - "bootstrap" { $bootstrap = $true } - "singleheader" { $singleheader = $true } - "tests" { $tests = $true } - } -}} -#endregion Arguments - -#region Building -write-host "Building gencpp with $compiler" - -if ($IsWindows) { - # This library was really designed to only run on 64-bit systems. - # (Its a development tool after all) - & $devshell -arch amd64 -} - -$path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_project = Join-Path $path_root project -$path_scripts = Join-Path $path_root scripts -$path_singleheader = Join-Path $path_root singleheader -$path_test = Join-Path $path_root test - -write-host "Build Type: $(if ($release) {"Release"} else {"Debug"} )" - -if ( $compiler -eq $null ) { - write-host "No compilier specified, assuming clang available" - $compiler = "clang" -} - -Push-Location $path_root - -function run-compiler -{ - param( $compiler, $unit, $compiler_args ) - - write-host "`Compiling $unit" - write-host "Compiler config:" - $compiler_args | ForEach-Object { - write-host $_ -ForegroundColor Cyan - } - - $time_taken = Measure-Command { - & $compiler $compiler_args 2>&1 | ForEach-Object { - $color = 'White' - switch ($_){ - { $_ -match "error" } { $color = 'Red' ; break } - { $_ -match "warning" } { $color = 'Yellow'; break } - } - write-host `t $_ -ForegroundColor $color - } - } - - if ( Test-Path($unit) ) { - write-host "$unit compile finished in $($time_taken.TotalMilliseconds) ms" - } - else { - write-host "Compile failed for $unit" -ForegroundColor Red - } -} - -function run-linker -{ - param( $linker, $binary, $linker_args ) - - write-host "`Linking $binary" - write-host "Linker config:" - $linker_args | ForEach-Object { - write-host $_ -ForegroundColor Cyan - } - - $time_taken = Measure-Command { - & $linker $linker_args 2>&1 | ForEach-Object { - $color = 'White' - switch ($_){ - { $_ -match "error" } { $color = 'Red' ; break } - { $_ -match "warning" } { $color = 'Yellow'; break } - } - write-host `t $_ -ForegroundColor $color - } - } - - if ( Test-Path($binary) ) { - write-host "$binary linking finished in $($time_taken.TotalMilliseconds) ms" - } - else { - write-host "Linking failed for $binary" -ForegroundColor Red - } -} - -if ( $compiler -match "clang" ) -{ - # https://clang.llvm.org/docs/ClangCommandLineReference.html - $flag_compile = '-c' - $flag_color_diagnostics = '-fcolor-diagnostics' - $flag_no_color_diagnostics = '-fno-color-diagnostics' - $flag_debug = '-g' - $flag_debug_codeview = '-gcodeview' - $flag_define = '-D' - $flag_include = '-I' - $flag_library = '-l' - $flag_library_path = '-L' - $flag_link_win = '-Wl,' - $flag_link_win_subsystem_console = '/SUBSYSTEM:CONSOLE' - $flag_link_win_machine_32 = '/MACHINE:X86' - $flag_link_win_machine_64 = '/MACHINE:X64' - $flag_link_win_debug = '/DEBUG' - $flag_link_win_pdb = '/PDB:' - $flag_link_win_path_output = '/OUT:' - $flag_no_optimization = '-O0' - $flag_path_output = '-o' - $flag_preprocess_non_intergrated = '-no-integrated-cpp' - $flag_profiling_debug = '-fdebug-info-for-profiling' - $flag_target_arch = '-target' - $flag_wall = '-Wall' - $flag_warning = '-W' - $flag_warning_as_error = '-Werror' - $flag_win_nologo = '/nologo' - - $ignore_warning_ms_include = 'no-microsoft-include' - - $target_arch = Get-TargetArchClang - - $warning_ignores = @( - $ignore_warning_ms_include - ) - - # https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170 - $libraries = @( - 'Kernel32' # For Windows API - # 'msvcrt', # For the C Runtime (Dynamically Linked) - # 'libucrt', - 'libcmt' # For the C Runtime (Static Linkage) - ) - - if ( $bootstrap ) - { - $path_build = join-path $path_project build - $path_gen = join-path $path_project gen - - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $include = $path_project - $unit = join-path $path_project "bootstrap.cpp" - $object = join-path $path_build "bootstrap.obj" - $executable = join-path $path_build "bootstrap.exe" - $pdb = join-path $path_build "bootstrap.pdb" - - $compiler_args = @( - $flag_no_color_diagnostics, - $flag_target_arch, $target_arch, - $flag_wall, - $flag_preprocess_non_intergrated, - ( $flag_define + 'GEN_TIME' ), - ( $flag_path_output + $object ), - ( $flag_include + $include ) - ) - - $warning_ignores | ForEach-Object { - $compiler_args += $flag_warning + $_ - } - - if ( $release -eq $false ) { - $compiler_args += ( $flag_define + 'Build_Debug' ) - $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug - } - - $compiler_args += $flag_compile, $unit - run-compiler clang++ $unit $compiler_args - - $linker_args = @( - $flag_link_win_subsystem_console, - $flag_link_win_machine_64, - $( $flag_link_win_path_output + $executable ) - ) - if ( $release -eq $false ) { - $linker_args += $flag_link_win_debug - $linker_args += $flag_link_win_pdb + $pdb - } - else { - } - - $libraries | ForEach-Object { - $linker_args += $_ + '.lib' - } - - $linker_args += $object - run-linker lld-link $executable $linker_args - - Push-Location $path_project - if ( Test-Path( $executable ) ) { - write-host "`nRunning bootstrap" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location - } - - if ( $singleheader ) - { - $path_build = join-path $path_singleheader build - $path_gen = join-path $path_singleheader gen - - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $include = $path_project - $unit = join-path $path_singleheader "singleheader.cpp" - $object = join-path $path_build "singleheader.obj" - $executable = join-path $path_build "singleheader.exe" - $pdb = join-path $path_build "singleheader.pdb" - - $compiler_args = @( - $flag_no_color_diagnostics, - $flag_target_arch, $target_arch, - $flag_wall, - $flag_preprocess_non_intergrated, - ( $flag_define + 'GEN_TIME' ), - ( $flag_path_output + $object ), - ( $flag_include + $include ) - ) - if ( $release -eq $false ) { - $compiler_args += ( $flag_define + 'Build_Debug' ) - $compiler_args += $flag_debug, $flag_debug_codeview, $flag_profiling_debug - } - - $warning_ignores | ForEach-Object { - $compiler_args += $flag_warning + $_ - } - - $compiler_args += $flag_compile, $unit - run-compiler clang $unit $compiler_args - - $linker_args = @( - $flag_link_win_subsystem_console, - $flag_link_win_machine_64, - $( $flag_link_win_path_output + $executable ) - ) - if ( $release -eq $false ) { - $linker_args += $flag_link_win_debug - $linker_args += $flag_link_win_pdb + $pdb - } - else { - } - - $libraries | ForEach-Object { - $linker_args += $_ + '.lib' - } - - $linker_args += $object - run-linker lld-link $executable $linker_args - - Push-Location $path_singleheader - if ( Test-Path( $executable ) ) { - write-host "`nRunning singleheader generator" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location - } - - if ( $test ) - { - # ... [your test compilation code here] - } -} - -if ( $compiler -match "msvc" ) -{ - # https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category?view=msvc-170 - $flag_compile = '/c' - $flag_debug = '/Zi' - $flag_define = '/D' - $flag_include = '/I' - $flag_full_src_path = '/FC' - $flag_nologo = '/nologo' - $flag_dll = '/LD' - $flag_dll_debug = '/LDd' - $flag_linker = '/link' - $flag_link_debug = '/DEBUG' - $flag_link_pdb = '/PDB:' - $flag_link_machine_32 = '/MACHINE:X86' - $flag_link_machine_64 = '/MACHINE:X64' - $flag_link_path_output = '/OUT:' - $flag_link_rt_dll = '/MD' - $flag_link_rt_dll_debug = '/MDd' - $flag_link_rt_static = '/MT' - $flag_link_rt_static_debug = '/MTd' - $flag_link_subsystem_console = '/SUBSYSTEM:CONSOLE' - $flag_link_subsystem_windows = '/SUBSYSTEM:WINDOWS' - $flag_out_name = '/OUT:' - $flag_path_interm = '/Fo' - $flag_path_debug = '/Fd' - $flag_path_output = '/Fe' - $flag_preprocess_conform = '/Zc:preprocessor' - - [array] $compiler_args = $null - [array] $linker_args = $null - - if ( $bootstrap ) - { - $path_build = join-path $path_project build - $path_gen = join-path $path_project gen - - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $include = $path_project - $unit = join-path $path_project "bootstrap.cpp" - $object = join-path $path_build "bootstrap.obj" - $executable = join-path $path_build "bootstrap.exe" - $pdb = join-path $path_build "bootstrap.pdb" - - $compiler_args = @( - $flag_nologo, - $flag_preprocess_conform, - $flag_define + 'GEN_TIME', - $flag_full_src_path, - ( $flag_path_interm + $path_build + '\' ), - ( $flag_path_output + $path_build + '\' ), - ( $flag_include + $include ) - ) - - if ( $release -eq $false ) { - $compiler_args += ( $flag_define + 'Build_Debug' ) - $compiler_args += $flag_debug - $compiler_args += ( $flag_path_debug + $path_build + '\' ) - $compiler_args += $flag_link_rt_static_debug - } - else { - $compiler_args += $flag_link_rt_static - } - - $compiler_args += $flag_compile, $unit - run-compiler cl $unit $compiler_args - - $linker_args = @( - $flag_nologo, - $flag_link_machine_64, - $flag_link_subsystem_console, - ( $flag_link_path_output + $executable ) - ) - if ( $release -eq $false ) { - $linker_args += $flag_link_debug - $linker_args += $flag_link_pdb + $pdb - } - else { - } - - $linker_args += $object - run-linker link $executable $linker_args - - Push-Location $path_project - if ( Test-Path( $executable ) ) { - write-host "`nRunning bootstrap" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location - } - - if ( $singleheader ) - { - $path_build = join-path $path_singleheader build - $path_gen = join-path $path_singleheader gen - - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $include = $path_project - $unit = join-path $path_singleheader "singleheader.cpp" - $object = join-path $path_build "singleheader.obj" - $executable = join-path $path_build "singleheader.exe" - $pdb = join-path $path_build "singleheader.pdb" - - $compiler_args = @( - $flag_nologo, - $flag_preprocess_conform, - $flag_debug, - ( $flag_define + 'GEN_TIME' ), - $flag_full_src_path, - ( $flag_path_interm + $path_build + '\' ), - ( $flag_path_output + $path_build + '\' ), - ( $flag_include + $include ) - ) - - if ( $release -eq $false ) { - $compiler_args += ( $flag_define + 'Build_Debug' ) - $compiler_args += ( $flag_path_debug + $path_build + '\' ) - $compiler_args += $flag_link_rt_static_debug - } - else { - $compiler_args += $flag_link_rt_static - } - - $compiler_args += $flag_compile, $unit - run-compiler cl $unit $compiler_args - - $linker_args = @( - $flag_nologo, - $flag_link_machine_64, - $flag_link_subsystem_console, - ( $flag_link_path_output + $executable ) - ) - if ( $release -eq $false ) { - $linker_args += $flag_link_debug - $linker_args += $flag_link_pdb + $pdb - } - else { - } - - $linker_args += $object - run-linker link $executable $linker_args - - Push-Location $path_singleheader - if ( Test-Path($executable) ) { - write-host "`nRunning singleheader generator" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location - } - - if ( $test ) - { - - } -} -#endregion Building - -#region Formatting -if ( $bootstrap -and (Test-Path (Join-Path $path_project "gen/gen.hpp")) ) -{ - $path_gen = join-path $path_project gen - - # Format generated gencpp - Write-Host "`nBeginning format" - $formatParams = @( - '-i' # In-place - '-style=file:./scripts/.clang-format' - '-verbose' - ) - - $include = @( - 'gen.hpp', 'gen.cpp', - 'gen.dep.hpp', 'gen.dep.cpp', - 'gen.builder.hpp', 'gen.builder.cpp' - 'gen.scanner.hpp', 'gen.scanner.cpp' - ) - $exclude = $null - - $targetFiles = @(Get-ChildItem -Recurse -Path $path_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) - - $time_taken = Measure-Command { - clang-format $formatParams $targetFiles - } - Write-Host "`nFormatting complete in $($time_taken.TotalMilliseconds) ms" -} - -if ( $singleheader -and (Test-Path (Join-Path $path_singleheader "gen/gen.hpp")) ) -{ - $path_gen = join-path $path_singleheader gen - - # Format generated gencpp - Write-Host "`nBeginning format" - $formatParams = @( - '-i' # In-place - '-style=file:./scripts/.clang-format' - '-verbose' - ) - - $include = @( - 'gen.hpp' - ) - $exclude = $null - - $targetFiles = @(Get-ChildItem -Recurse -Path $path_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) - - $time_taken = Measure-Command { - clang-format $formatParams $targetFiles - } - Write-Host "`nFormatting complete in $($time_taken.TotalMilliseconds) ms" -} - -if ( $test ) -{ - -} -#endregion Formatting - -Pop-Location # $path_root +$build = Join-Path $PSScriptRoot 'build.ci.ps1' +& $build @args diff --git a/scripts/helpers/devshell.ps1 b/scripts/helpers/devshell.ps1 index 3b97a0f..531bdfa 100644 --- a/scripts/helpers/devshell.ps1 +++ b/scripts/helpers/devshell.ps1 @@ -20,4 +20,4 @@ if ( -not (Test-Path $vs_devshell) ) { # Launch the Visual Studio Developer Shell Push-Location & $vs_devshell @args -Pop-Location \ No newline at end of file +Pop-Location diff --git a/scripts/package_release.ps1 b/scripts/package_release.ps1 index 839b63d..93802f0 100644 --- a/scripts/package_release.ps1 +++ b/scripts/package_release.ps1 @@ -1,6 +1,13 @@ cls -Invoke-Expression "& $(Join-Path $PSScriptRoot 'bootstrap.ci.ps1')" -Invoke-Expression "& $(Join-Path $PSScriptRoot 'singleheader.ci.ps1')" + +$build = Join-Path $PSScriptRoot 'build.ci.ps1' + +if ( $IsWindows ) { + & $build release msvc bootstrap singleheader +} +else { + & $build release clang bootstrap singleheader +} $path_root = git rev-parse --show-toplevel $path_docs = Join-Path $path_root docs @@ -24,10 +31,10 @@ $readme_root = Join-Path $path_root Readme.md $readme_docs = Join-Path $path_docs Readme.md $readme_parsing = Join-Path $path_docs Parsing.md -Copy-Item $license -Destination $(Join-Path $path_release_content "LICENSE") -Copy-Item $readme_root -Destination $(Join-Path $path_release_content "Readme.md") -Copy-Item $readme_docs -Destination $(Join-Path $path_release_content "Readme_Docs.md") -Copy-Item $readme_parsing -Destination $(Join-Path $path_release_content "Parsing.md") +Copy-Item $license -Destination (Join-Path $path_release_content "LICENSE") +Copy-Item $readme_root -Destination (Join-Path $path_release_content "Readme.md") +Copy-Item $readme_docs -Destination (Join-Path $path_release_content "Readme_Docs.md") +Copy-Item $readme_parsing -Destination (Join-Path $path_release_content "Parsing.md") # Singleheader Copy-Item -Path $path_singleheader_gen\gen.hpp -Destination $path_release_content\gen.hpp diff --git a/scripts/test.gen_build.ci.ps1 b/scripts/test.gen_build.ci.ps1 deleted file mode 100644 index ad708ee..0000000 --- a/scripts/test.gen_build.ci.ps1 +++ /dev/null @@ -1,45 +0,0 @@ -[string] $type = $null -[string] $test = $false - -foreach ( $arg in $args ) -{ - if ( $arg -eq "test" ) - { - $test = $true - } - else - { - $type = $arg - } -} - -$path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_scripts = Join-Path $path_root scripts -$path_test = Join-Path $path_root test -$path_gen = Join-Path $path_test gen -$path_test_build = Join-Path $path_test build -$path_gen_build = Join-Path $path_gen build - -write-host "`n`nBuilding Test`n" - -if ( -not( Test-Path $path_gen_build ) ) -{ -# Generate build files for meta-program -Push-Location $path_gen - $args_meson = @() - $args_meson += "setup" - $args_meson += $path_gen_build - - & meson $args_meson -Pop-Location -} - -# Compile meta-program -Push-Location $path_root - $args_ninja = @() - $args_ninja += "-C" - $args_ninja += $path_gen_build - - & ninja $args_ninja -Pop-Location diff --git a/scripts/test.gen_build.ps1 b/scripts/test.gen_build.ps1 deleted file mode 100644 index 39814df..0000000 --- a/scripts/test.gen_build.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -cls -Invoke-Expression "& $(Join-Path $PSScriptRoot 'test.gen_build.ci.ps1') $args" diff --git a/scripts/test.gen_run.ps1 b/scripts/test.gen_run.ps1 deleted file mode 100644 index 2508b6e..0000000 --- a/scripts/test.gen_run.ps1 +++ /dev/null @@ -1,102 +0,0 @@ -cls - -[string] $type = $null -[string] $test = $false - -foreach ( $arg in $args ) -{ - if ( $arg -eq "test" ) - { - $test = $true - } - else - { - $type = $arg - } -} - -$path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_scripts = Join-Path $path_root scripts -$path_test = Join-Path $path_root test -$path_gen = Join-Path $path_test gen -$path_test_build = Join-Path $path_test build -$path_gen_build = Join-Path $path_gen build - -# Invoke-Expression "& $(Join-Path $PSScriptRoot 'bootstrap.ci.ps1')" -# Invoke-Expression "& $(Join-Path $PSScriptRoot 'singleheader.ci.ps1')" - -write-host "`n`nBuilding Test`n" - -if ( -not( Test-Path $path_gen_build ) ) -{ -# Generate build files for meta-program -Push-Location $path_gen - $args_meson = @() - $args_meson += "setup" - $args_meson += $path_gen_build - - & meson $args_meson -Pop-Location -} - -# Compile meta-program -Push-Location $path_root - $args_ninja = @() - $args_ninja += "-C" - $args_ninja += $path_gen_build - - & ninja $args_ninja -Pop-Location - -Push-location $path_gen -# Run meta-program - $gencpp = Join-Path $path_gen_build gencpp.exe - - Write-Host `nRunning tests... - & $gencpp - -# Format generated files - $path_clang_format = Join-Path $path_scripts .clang-format - - Write-Host `nBeginning format... - $formatParams = @( - '-i' # In-place - "-style=file:$path_clang_format" # Search for a .clang-format file in the parent directory of the source file. - '-verbose' - ) - - $include = @('*.gen.hpp', '*.gen.cpp') - $exclude = $null - - $targetFiles = @(Get-ChildItem -Recurse -Path $path_gen -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) - - clang-format $formatParams $targetFiles - Write-Host "`nFormatting complete" -Pop-Location - -# Build the program depending on generated files. -if ( -not( Test-Path $path_test_build ) ) -{ -Push-Location $path_test - $args_meson = @() - $args_meson += "setup" - $args_meson += $path_test_build - -# & meson $args_meson -Pop-Location -} - -Push-Location $path_root - $args_ninja = @() - $args_ninja += "-C" - $args_ninja += $path_test_build - - # ninja $args_ninja -Pop-Location - -Push-Location $path_test - $testcpp = Join-Path $path_test_build testcpp.exe - - # & $testcpp -Pop-Location diff --git a/test/SOA.cpp b/test/SOA.cpp index 5a67519..445e022 100644 --- a/test/SOA.cpp +++ b/test/SOA.cpp @@ -2,8 +2,8 @@ #define GEN_ENFORCE_STRONG_CODE_TYPES #define GEN_EXPOSE_BACKEND #define GEN_BENCHMARK -#include "gen/gen.hpp" -#include "gen/gen.builder.hpp" +#include "gen.hpp" +#include "gen.builder.hpp" using namespace gen; Code gen_SOA( CodeStruct struct_def, s32 num_entries = 0 ) diff --git a/test/gen/meson.build b/test/gen/meson.build deleted file mode 100644 index 7371645..0000000 --- a/test/gen/meson.build +++ /dev/null @@ -1,27 +0,0 @@ -project( 'test', 'c', 'cpp', default_options : ['buildtype=debug'] ) - -# add_global_arguments('-E', language : 'cpp') - -includes = include_directories( -[ - '../../project', - # '../../thirdparty' -]) - -# get_sources = files('./get_sources.ps1') -# sources = files(run_command('powershell', get_sources, check: true).stdout().strip().split('\n')) - -sources = [ '../test.cpp' ] - -if get_option('buildtype').startswith('debug') - - add_project_arguments('-DBuild_Debug', language : ['c', 'cpp']) - # add_project_arguments('-E', language : ['c', 'cpp']) - -endif - # add_project_arguments('-E', language : ['c', 'cpp']) - # add_global_arguments( '-E', language : ['cpp']) - -add_project_arguments('-DGEN_TIME', language : ['c', 'cpp']) - -executable( 'gencpp', sources, include_directories : includes ) diff --git a/test/meson.build b/test/meson.build deleted file mode 100644 index 589d75a..0000000 --- a/test/meson.build +++ /dev/null @@ -1,25 +0,0 @@ -project( 'test', 'c', 'cpp', default_options : ['buildtype=debug'] ) - -# add_global_arguments('-E', language : 'cpp') - -includes = include_directories( - [ - './gen', - '../project', - # '../thirdparty' - ]) - -# get_sources = files('./get_sources.ps1') -# sources = files(run_command('powershell', get_sources, check: true).stdout().strip().split('\n')) - -sources = [ 'test.cpp' ] - -if get_option('buildtype').startswith('debug') - - add_project_arguments('-DBuild_Debug', language : ['c', 'cpp']) - -endif - -add_project_arguments('-Druntime', language : ['c', 'cpp']) - -executable( 'testcpp', sources, include_directories : includes ) diff --git a/test/sanity.cpp b/test/sanity.cpp index d9309a5..da1f398 100644 --- a/test/sanity.cpp +++ b/test/sanity.cpp @@ -4,8 +4,8 @@ #define GEN_ENFORCE_STRONG_CODE_TYPES #define GEN_EXPOSE_BACKEND #define GEN_BENCHMARK -#include "gen/gen.hpp" -#include "gen/gen.builder.hpp" +#include "gen.hpp" +#include "gen.builder.hpp" void check_sanity() { diff --git a/test/test.cpp b/test/test.cpp index 11b6c77..6ca6858 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -2,8 +2,8 @@ #define GEN_ENFORCE_STRONG_CODE_TYPES #define GEN_EXPOSE_BACKEND #define GEN_BENCHMARK -#include "gen/gen.cpp" -#include "gen/gen.builder.cpp" +#include "gen.cpp" +#include "gen.builder.cpp" #include "sanity.cpp" #include "SOA.cpp" #include "test.singleheader_ast.cpp" diff --git a/test/test.singleheader_ast.cpp b/test/test.singleheader_ast.cpp index 1c386e4..53576d4 100644 --- a/test/test.singleheader_ast.cpp +++ b/test/test.singleheader_ast.cpp @@ -2,9 +2,9 @@ #define GEN_ENFORCE_STRONG_CODE_TYPES #define GEN_EXPOSE_BACKEND #define GEN_BENCHMARK -#include "gen/gen.hpp" -#include "gen/gen.builder.hpp" -#include "gen/gen.scanner.hpp" +#include "gen.hpp" +#include "gen.builder.hpp" +#include "gen.scanner.hpp" using namespace gen; void check_singleheader_ast() From f574a9ba9ae3457c808232e75fbe5eb8342907df Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 20 Aug 2023 13:02:50 -0400 Subject: [PATCH 07/10] Further improvements to build script test is failing to complete properly, need to debug... --- scripts/build.ci.ps1 | 280 +++++++++++++-------------------- test/sanity.cpp | 2 +- test/test.cpp | 2 +- test/test.singleheader_ast.cpp | 2 +- 4 files changed, 111 insertions(+), 175 deletions(-) diff --git a/scripts/build.ci.ps1 b/scripts/build.ci.ps1 index febd109..8bcef26 100644 --- a/scripts/build.ci.ps1 +++ b/scripts/build.ci.ps1 @@ -8,19 +8,19 @@ $devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' cls #region Arguments - $compiler = $null + $vendor = $null $release = $null [bool] $bootstrap = $false [bool] $singleheader = $false [bool] $test = $false -[array] $compilers = @( "clang", "msvc" ) +[array] $vendors = @( "clang", "msvc" ) # This is a really lazy way of parsing the args, could use actual params down the line... if ( $args ) { $args | ForEach-Object { switch ($_){ - { $_ -in $compilers } { $compiler = $_; break } + { $_ -in $vendors } { $vendor = $_; break } "release" { $release = $true } "debug" { $release = $false } "bootstrap" { $bootstrap = $true } @@ -30,8 +30,7 @@ if ( $args ) { $args | ForEach-Object { }} #endregion Arguments -#region Building - +#region Configuration if ($IsWindows) { # This library was really designed to only run on 64-bit systems. # (Its a development tool after all) @@ -46,12 +45,12 @@ $path_singleheader = Join-Path $path_root singleheader $path_test = Join-Path $path_root test -if ( $compiler -eq $null ) { - write-host "No compilier specified, assuming clang available" +if ( $vendor -eq $null ) { + write-host "No vendor specified, assuming clang available" $compiler = "clang" } -if ( $release -eq $null ) { +if ( $vendor -eq $null ) { write-host "No build type specified, assuming debug" $release = $false } @@ -60,7 +59,7 @@ if ( $bootstrap -eq $false -and $singleheader -eq $false -and $test -eq $false ) throw "No build target specified. One must be specified, this script will not assume one" } -write-host "Building gencpp with $compiler" +write-host "Building gencpp with $vendor" write-host "Build Type: $(if ($release) {"Release"} else {"Debug"} )" Push-Location $path_root @@ -123,7 +122,7 @@ function run-linker } } -if ( $compiler -match "clang" ) +if ( $vendor -match "clang" ) { # https://clang.llvm.org/docs/ClangCommandLineReference.html $flag_compile = '-c' @@ -170,7 +169,8 @@ if ( $compiler -match "clang" ) function build-simple { - param( $compiler, $linker, $includes, $unit, $executable ) + param( $includes, $unit, $executable ) + Write-Host "build-simple: clang" $object = $executable -replace '\.exe', '.obj' $pdb = $executable -replace '\.exe', '.pdb' @@ -217,78 +217,11 @@ if ( $compiler -match "clang" ) run-linker $linker $executable $linker_args } - [array] $compiler_args = $null - [array] $linker_args = $null - - if ( $bootstrap ) - { - $path_build = join-path $path_project build - $path_gen = join-path $path_project gen - - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $includes = @( $path_project ) - $unit = join-path $path_project "bootstrap.cpp" - $executable = join-path $path_build "bootstrap.exe" - - build-simple clang++ lld-link $include $unit $executable - - Push-Location $path_project - if ( Test-Path( $executable ) ) { - write-host "`nRunning bootstrap" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location - } - - if ( $singleheader ) - { - $path_build = join-path $path_singleheader build - $path_gen = join-path $path_singleheader gen - - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $include = $path_project - $unit = join-path $path_singleheader "singleheader.cpp" - $executable = join-path $path_build "singleheader.exe" - - build-simple clang++ lld-link $include $unit $executable - - Push-Location $path_singleheader - if ( Test-Path( $executable ) ) { - write-host "`nRunning singleheader generator" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location - } - - if ( $test ) - { - # ... [your test compilation code here] - } + $compiler = 'clang++' + $linker = 'lld-link' } -if ( $compiler -match "msvc" ) +if ( $vendor -match "msvc" ) { # https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category?view=msvc-170 $flag_compile = '/c' @@ -321,7 +254,8 @@ if ( $compiler -match "msvc" ) # This works because this project uses a single unit to build function build-simple { - param( $compiler, $linker, $includes, $unit, $executable ) + param( $includes, $unit, $executable ) + Write-Host "build-simple: msvc" $object = $executable -replace '\.exe', '.obj' $pdb = $executable -replace '\.exe', '.pdb' @@ -365,109 +299,111 @@ if ( $compiler -match "msvc" ) run-linker $linker $executable $linker_args } - [array] $compiler_args = $null - [array] $linker_args = $null + $compiler = 'cl' + $linker = 'link' +} +#endregion Configuration - if ( $bootstrap ) - { - $path_build = join-path $path_project build - $path_gen = join-path $path_project gen +#region Building +if ( $bootstrap ) +{ + $path_build = join-path $path_project build + $path_gen = join-path $path_project gen - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - - $includes = @( $path_project) - $unit = join-path $path_project "bootstrap.cpp" - $executable = join-path $path_build "bootstrap.exe" - - build-simple cl link $includes $unit $executable - - Push-Location $path_project - if ( Test-Path( $executable ) ) { - write-host "`nRunning bootstrap" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } - } - write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen } - if ( $singleheader ) - { - $path_build = join-path $path_singleheader build - $path_gen = join-path $path_singleheader gen + $includes = @( $path_project) + $unit = join-path $path_project "bootstrap.cpp" + $executable = join-path $path_build "bootstrap.exe" - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } + build-simple $includes $unit $executable - $includes = @($path_project) - $unit = join-path $path_singleheader "singleheader.cpp" - $executable = join-path $path_build "singleheader.exe" - - build-simple cl link $includes $unit $executable - - Push-Location $path_singleheader - if ( Test-Path($executable) ) { - write-host "`nRunning singleheader generator" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } + Push-Location $path_project + if ( Test-Path( $executable ) ) { + write-host "`nRunning bootstrap" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green } - write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location + } + write-host "`nBootstrap completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location +} + +if ( $singleheader ) +{ + $path_build = join-path $path_singleheader build + $path_gen = join-path $path_singleheader gen + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build + } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen } - if ( $test ) - { - $path_gen = join-path $path_test gen - $path_gen_build = join-path $path_gen build - $path_build = join-path $path_test build + $includes = @($path_project) + $unit = join-path $path_singleheader "singleheader.cpp" + $executable = join-path $path_build "singleheader.exe" - if ( -not(Test-Path($path_build) )) { - New-Item -ItemType Directory -Path $path_build - } - if ( -not(Test-Path($path_gen) )) { - New-Item -ItemType Directory -Path $path_gen - } - if ( -not(Test-Path($path_gen_build) )) { - New-Item -ItemType Directory -Path $path_gen_build - } + build-simple $includes $unit $executable - $path_bootstrap = join-path $path_project gen - - $include = $path_bootstrap - $unit = join-path $path_test "test.cpp" - $object = join-path $path_build "test.obj" - $executable = join-path $path_build "test.exe" - $pdb = join-path $path_build "test.pdb" - - build-simple cl link $include $unit $executable - - Push-Location $path_test - if ( Test-Path( $executable ) ) { - write-host "`nRunning test generator" - $time_taken = Measure-Command { & $executable - | ForEach-Object { - write-host `t $_ -ForegroundColor Green - } + Push-Location $path_singleheader + if ( Test-Path($executable) ) { + write-host "`nRunning singleheader generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green } - write-host "`nTest generator completed in $($time_taken.TotalMilliseconds) ms" - } - Pop-Location + } + write-host "`nSingleheader generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location +} + +if ( $test ) +{ + $path_gen = join-path $path_test gen + $path_gen_build = join-path $path_gen build + $path_build = join-path $path_test build + + if ( -not(Test-Path($path_build) )) { + New-Item -ItemType Directory -Path $path_build } + if ( -not(Test-Path($path_gen) )) { + New-Item -ItemType Directory -Path $path_gen + } + if ( -not(Test-Path($path_gen_build) )) { + New-Item -ItemType Directory -Path $path_gen_build + } + + $path_bootstrap = join-path $path_project gen + + $include = $path_bootstrap + $unit = join-path $path_test "test.cpp" + $object = join-path $path_build "test.obj" + $executable = join-path $path_build "test.exe" + $pdb = join-path $path_build "test.pdb" + + build-simple $include $unit $executable + + Push-Location $path_test + if ( Test-Path( $executable ) ) { + write-host "`nRunning test generator" + $time_taken = Measure-Command { & $executable + | ForEach-Object { + write-host `t $_ -ForegroundColor Green + } + } + write-host "`nTest generator completed in $($time_taken.TotalMilliseconds) ms" + } + Pop-Location } #endregion Building diff --git a/test/sanity.cpp b/test/sanity.cpp index da1f398..992907c 100644 --- a/test/sanity.cpp +++ b/test/sanity.cpp @@ -64,7 +64,7 @@ void check_sanity() log_fmt("Num String Cache : %llu\n", StringCache.Entries.num(), StringCache); Builder builder; - builder.open( "sanity.gen.hpp" ); + builder.open( "gen/sanity.gen.hpp" ); idx = typedefs.num(); #ifdef GEN_BENCHMARK diff --git a/test/test.cpp b/test/test.cpp index 6ca6858..d8e7a7e 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -14,7 +14,7 @@ int gen_main() using namespace gen; log_fmt("\ngen_time:"); - // check_sanity(); + check_sanity(); // check_SOA(); diff --git a/test/test.singleheader_ast.cpp b/test/test.singleheader_ast.cpp index 53576d4..707d2f6 100644 --- a/test/test.singleheader_ast.cpp +++ b/test/test.singleheader_ast.cpp @@ -23,7 +23,7 @@ void check_singleheader_ast() time_start = time_rel_ms(); Builder - builder = Builder::open( "singleheader_copy.gen.hpp" ); + builder = Builder::open( "gen/singleheader_copy.gen.hpp" ); builder.print( ast ); builder.write(); From 2f7836b1917597fdb14db102b5cdaea5deef176e Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 20 Aug 2023 13:18:09 -0400 Subject: [PATCH 08/10] Fixes to buildscript --- scripts/build.ci.ps1 | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/build.ci.ps1 b/scripts/build.ci.ps1 index 8bcef26..993d6b3 100644 --- a/scripts/build.ci.ps1 +++ b/scripts/build.ci.ps1 @@ -2,11 +2,14 @@ # It will most likely need a partial rewrite to segment the build process into separate script invocations based on the OS. # That or just rewrite it in an sh script and call it a day. -Import-Module ./helpers/target_arch.psm1 -$devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' - cls +Import-Module ./helpers/target_arch.psm1 +$devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' +$path_root = git rev-parse --show-toplevel + +Push-Location $path_root + #region Arguments $vendor = $null $release = $null @@ -37,20 +40,12 @@ if ($IsWindows) { & $devshell -arch amd64 } -$path_root = git rev-parse --show-toplevel -$path_build = Join-Path $path_root build -$path_project = Join-Path $path_root project -$path_scripts = Join-Path $path_root scripts -$path_singleheader = Join-Path $path_root singleheader -$path_test = Join-Path $path_root test - - if ( $vendor -eq $null ) { write-host "No vendor specified, assuming clang available" $compiler = "clang" } -if ( $vendor -eq $null ) { +if ( $release -eq $null ) { write-host "No build type specified, assuming debug" $release = $false } @@ -62,8 +57,6 @@ if ( $bootstrap -eq $false -and $singleheader -eq $false -and $test -eq $false ) write-host "Building gencpp with $vendor" write-host "Build Type: $(if ($release) {"Release"} else {"Debug"} )" -Push-Location $path_root - function run-compiler { param( $compiler, $unit, $compiler_args ) @@ -305,6 +298,13 @@ if ( $vendor -match "msvc" ) #endregion Configuration #region Building + +$path_build = Join-Path $path_root build +$path_project = Join-Path $path_root project +$path_scripts = Join-Path $path_root scripts +$path_singleheader = Join-Path $path_root singleheader +$path_test = Join-Path $path_root test + if ( $bootstrap ) { $path_build = join-path $path_project build @@ -408,6 +408,7 @@ if ( $test ) #endregion Building #region Formatting + function format-cpp { param( $path, $include, $exclude ) @@ -420,7 +421,10 @@ function format-cpp '-verbose' ) - $targetFiles = @(Get-ChildItem -Recurse -Path $path -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName) + $targetFiles = @( + Get-ChildItem -Recurse -Path $path -Include $include -Exclude $exclude + | Select-Object -ExpandProperty FullName + ) $time_taken = Measure-Command { clang-format $formatParams $targetFiles From 05fa62eced8482598bb0bfdf1db9309e70d6aae7 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 20 Aug 2023 15:45:06 -0400 Subject: [PATCH 09/10] Test building & generation fixed with altest scripts --- .vscode/launch.json | 4 ++-- project/dependencies/strings.hpp | 2 +- scripts/build.ci.ps1 | 19 ++++++++++--------- test/sanity.cpp | 3 +-- test/test.cpp | 4 ++-- test/test.singleheader_ast.cpp | 2 +- vc140.pdb | Bin 0 -> 241664 bytes 7 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 vc140.pdb diff --git a/.vscode/launch.json b/.vscode/launch.json index b9f0b72..ae30b68 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "name": "Debug gentime lldb", "program": "${workspaceFolder}/test/test.exe", "args": [], - "cwd": "${workspaceFolder}/test/gen/", + "cwd": "${workspaceFolder}/test/", "postRunCommands": [ ] }, @@ -20,7 +20,7 @@ "name": "Debug gentime vsdbg", "program": "${workspaceFolder}/test/build/test.exe", "args": [], - "cwd": "${workspaceFolder}/test/gen/", + "cwd": "${workspaceFolder}/test/", "visualizerFile": "${workspaceFolder}/scripts/gencpp.natvis" }, { diff --git a/project/dependencies/strings.hpp b/project/dependencies/strings.hpp index 18b145c..16a8ffc 100644 --- a/project/dependencies/strings.hpp +++ b/project/dependencies/strings.hpp @@ -72,7 +72,7 @@ struct String header->Capacity = capacity; header->Length = 0; - String result = { (char*)allocation + header_size }; + String result = { rcast(char*, allocation) + header_size }; return result; } diff --git a/scripts/build.ci.ps1 b/scripts/build.ci.ps1 index 993d6b3..37ec35f 100644 --- a/scripts/build.ci.ps1 +++ b/scripts/build.ci.ps1 @@ -298,7 +298,6 @@ if ( $vendor -match "msvc" ) #endregion Configuration #region Building - $path_build = Join-Path $path_root build $path_project = Join-Path $path_root project $path_scripts = Join-Path $path_root scripts @@ -348,14 +347,14 @@ if ( $singleheader ) New-Item -ItemType Directory -Path $path_gen } - $includes = @($path_project) + $includes = @( $path_project ) $unit = join-path $path_singleheader "singleheader.cpp" $executable = join-path $path_build "singleheader.exe" build-simple $includes $unit $executable Push-Location $path_singleheader - if ( Test-Path($executable) ) { + if ( Test-Path( $executable ) ) { write-host "`nRunning singleheader generator" $time_taken = Measure-Command { & $executable | ForEach-Object { @@ -385,13 +384,11 @@ if ( $test ) $path_bootstrap = join-path $path_project gen - $include = $path_bootstrap + $includes = @( $path_bootstrap ) $unit = join-path $path_test "test.cpp" - $object = join-path $path_build "test.obj" $executable = join-path $path_build "test.exe" - $pdb = join-path $path_build "test.pdb" - build-simple $include $unit $executable + build-simple $includes $unit $executable Push-Location $path_test if ( Test-Path( $executable ) ) { @@ -408,7 +405,6 @@ if ( $test ) #endregion Building #region Formatting - function format-cpp { param( $path, $include, $exclude ) @@ -457,7 +453,12 @@ if ( $singleheader -and (Test-Path (Join-Path $path_singleheader "gen/gen.hpp")) if ( $test ) { - + $path_gen = join-path $path_test gen + $include = @( + '*.gen.hpp' + ) + $exclude = $null + format-cpp $path_gen $include $exclude } #endregion Formatting diff --git a/test/sanity.cpp b/test/sanity.cpp index 992907c..dc63eac 100644 --- a/test/sanity.cpp +++ b/test/sanity.cpp @@ -63,8 +63,7 @@ void check_sanity() log_fmt("Num String Cache Arenas : %llu TotalSize: %llu !\n", StringArenas.num(), StringArenas.num() * SizePer_StringArena); log_fmt("Num String Cache : %llu\n", StringCache.Entries.num(), StringCache); - Builder builder; - builder.open( "gen/sanity.gen.hpp" ); + Builder builder = Builder::open( "./gen/sanity.gen.hpp" ); idx = typedefs.num(); #ifdef GEN_BENCHMARK diff --git a/test/test.cpp b/test/test.cpp index d8e7a7e..5362de4 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,3 +1,4 @@ +#if GEN_TIME #define GEN_DEFINE_LIBRARY_CODE_CONSTANTS #define GEN_ENFORCE_STRONG_CODE_TYPES #define GEN_EXPOSE_BACKEND @@ -8,13 +9,12 @@ #include "SOA.cpp" #include "test.singleheader_ast.cpp" -#if GEN_TIME int gen_main() { using namespace gen; log_fmt("\ngen_time:"); - check_sanity(); + // check_sanity(); // check_SOA(); diff --git a/test/test.singleheader_ast.cpp b/test/test.singleheader_ast.cpp index 707d2f6..e9d9388 100644 --- a/test/test.singleheader_ast.cpp +++ b/test/test.singleheader_ast.cpp @@ -9,7 +9,7 @@ using namespace gen; void check_singleheader_ast() { - #define project_dir "../../" + #define project_dir "../" gen::init(); log_fmt("\ncheck_singleheader_ast:\n"); diff --git a/vc140.pdb b/vc140.pdb new file mode 100644 index 0000000000000000000000000000000000000000..851b58536940f4d733890a27e176ec78e42a9c48 GIT binary patch literal 241664 zcmeEv37lL-wfE`U*&qRiKp^Zx!Wseu2wT`PnM}gKWM-Hp>~uOaJ;}gq^z?)T6(jB% z6cIN>MO<(L5q&PWA&4k0ptviF`*Sy-K9{F_|9@4Td+XNR?g`-Y`@Z+<`Tcsj>YP*O zRGm8K)N<=quNmwskB*NHR2rL)Z9eL##x>om8c#lE$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Eydg^#K8aLF8< z^aUI*0-<3v_6#tf9s3#T$#)wl7iUzeFSoA-W&UN_hHgz8H&MoASUI0Zk%LL}-Yfp; zaH{10lX8$hxTAa#gTkR_`a6w|@l3NH)_#Nk4{^smD#B6L3;iMD4vkGZA)OeT&>W74 z3uHT@c>(C3hzpJR*iP}AmUw$p+7R()VQx4cQ)$m#fU9jqv5ah_N}!XRdbE$OJa5XM zkNy5ePAQix8zd#&$m2Bh!}PZg@(_9=dBxu(5B>dzaS6(zeu@Sr%Adx1F(AFrO90PH z8T*f-p_0)*xj#`du(x-SuQZbLRQ_z3CTki4D&x`8$bn)k{Zd)VKOGC?e+yev9He>? zFY&3oI!T_dqIAZ*RPW#MhTu8<%fn3b(0oHMaQY4X8-6if5;2A3puEZMzvhp9iJ;Lx z<8deXE%8%2`uA(POe~Vq(wFmlem#rk{KkEsKc0zlel5d<#qu;lPePBxTO9?dIz=pt zOUEnfOuj~ZqJ4;T{bYWL_2ub=eaUBx^H=z=&N&^Qux)iNhu|B;`F@uN#cKLj3bv&F zdmwQ79n63G^WP!(6?HbYL3Qv_U4-nz@HhRVI?BFoG{z;q5u7e!0Lessf|iFCABaY> z{EjAcL%u|O#G~@*uxEjnLvqj@b``Wh;-mRJl@ECv%aOJ$r5~fZP`Zru{~7E5GuHoS ztpCqg|4$Jy<6njbGBl8(feZ~~Xdpua85+pYK!yhXzpVk|@BbO=|4l89(fkS^WBotP zi{Tyzd^DkT0K@qD=8X0Kias*d|118HvHoB2hm7_Aia%tm|4(~I1#)x%#xey;>-4E{wz?16ssJ%YBqz{K)@k z2{`?`)uslKGX7;~AVUKg8pzN{zBPY_$Ql0OF@}L~taGyf+5dB`_Rck8j2QM|*c}!axuO zQ7{PwpbNC Date: Sun, 20 Aug 2023 15:51:51 -0400 Subject: [PATCH 10/10] Made clean script remove the gen dir now from test dir. --- scripts/clean.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index 1f2d38f..6c2a78f 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -7,8 +7,7 @@ $path_singleheader_build = Join-Path $path_singleheader build $path_singleheader_gen = Join-Path $path_singleheader gen $path_test = Join-Path $path_root test $path_test_build = Join-Path $path_test build -$path_gen = Join-Path $path_test gen -$path_gen_build = Join-Path $path_gen build +$path_test_gen = Join-Path $path_test gen $path_x64 = Join-Path $path_root x64 $path_release = Join-Path $path_root release @@ -37,9 +36,9 @@ if ( Test-Path $path_test_build ) Remove-Item $path_test_build -Recurse } -if ( Test-Path $path_gen_build ) +if ( Test-Path $path_test_gen ) { - Remove-Item $path_gen_build -Recurse + Remove-Item $path_test_gen -Recurse } if ( Test-Path $path_x64)