got string builder working through the primary build.cpp

This commit is contained in:
Allen Webster 2017-07-09 15:49:41 -04:00
parent 39a56b2aa9
commit 8791fe28a5
4 changed files with 42 additions and 20 deletions

View File

@ -1,19 +1,21 @@
@echo off
SET OPTS=-W4 -wd4310 -wd4100 -wd4201 -wd4505 -wd4996 -wd4127 -wd4510 -wd4512 -wd4610 -wd4390 -WX
SET OPTS=%OPTS% -wd4611 -GR- -EHa- -nologo -FC
build.bat /DSTRING_BUILD
SET FirstError=0
pushd ..\build
cl %OPTS% ..\code\string\4ed_string_builder.cpp /Zi /Festring_builder
if %ERRORLEVEL% neq 0 (set FirstError=1)
if %ERRORLEVEL% neq 0 (goto END)
popd
pushd string
..\..\build\string_builder
if %ERRORLEVEL% neq 0 (set FirstError=1)
popd
:END
REM SET OPTS=-W4 -wd4310 -wd4100 -wd4201 -wd4505 -wd4996 -wd4127 -wd4510 -wd4512 -wd4610 -wd4390 -WX
REM SET OPTS=%OPTS% -wd4611 -GR- -EHa- -nologo -FC
REM
REM SET FirstError=0
REM
REM pushd ..\build
REM cl %OPTS% ..\code\string\4ed_string_builder.cpp /Zi /Festring_builder
REM if %ERRORLEVEL% neq 0 (set FirstError=1)
REM if %ERRORLEVEL% neq 0 (goto END)
REM popd
REM
REM pushd string
REM ..\..\build\string_builder
REM if %ERRORLEVEL% neq 0 (set FirstError=1)
REM popd
REM
REM :END

View File

@ -430,7 +430,7 @@ site_build(char *cdir, u32 flags){
END_TIME_SECTION("build sitegen");
}
{
if (prev_error == 0){
BEGIN_TIME_SECTION();
char *cmd = fm_str(BUILD_DIR"/sitegen");
char *code_dir = fm_str(".");
@ -472,6 +472,25 @@ metagen(char *cdir){
build_and_run(cdir, "meta/4ed_metagen.cpp", "metagen", OPTS | DEBUG_INFO);
}
internal void
string_build(char *cdir){
char *dir = fm_str(BUILD_DIR);
{
char *file = fm_str("string/4ed_string_builder.cpp");
BEGIN_TIME_SECTION();
build(OPTS | DEBUG_INFO, Arch_X64, cdir, file, dir, "string_builder", 0, 0, includes);
END_TIME_SECTION("build string_builder");
}
if (prev_error == 0){
char *cmd = fm_str(cdir, "/", dir, "/string_builder");
BEGIN_TIME_SECTION();
fm_execute_in_dir(fm_str(cdir, "/string"), cmd, 0);
END_TIME_SECTION("run string_builder");
}
}
internal void
do_buildsuper(char *cdir, char *file, u32 arch){
BEGIN_TIME_SECTION();
@ -668,6 +687,9 @@ int main(int argc, char **argv){
#elif defined(SITE_BUILD)
site_build(cdir, DEBUG_INFO);
#elif defined(STRING_BUILD)
string_build(cdir);
#else
# error No build type specified.
#endif

View File

@ -1,5 +1,5 @@
1
0
88
91

View File

@ -281,8 +281,6 @@ int main(){
Item_Node *item = string_unit.set.items + j;
if (item->t == Item_Function){
//append_ss (&line, item->marker);
//append_padding (&line, ' ', RETURN_PADDING);
append_ss (&line, item->ret);
append_padding (&line, ' ', SIG_PADDING);
append_ss (&line, item->name);