mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
Eliminate need for bison/flex in Visual Studio builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23999 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3fd24bd61f
commit
4ed1de843d
4
win32/AsmParser/.cvsignore
Normal file
4
win32/AsmParser/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Lexer.cpp
|
||||||
|
llvmAsmParser.cpp
|
||||||
|
llvmAsmParser.h
|
||||||
|
llvmAsmParser.output
|
@ -20,7 +20,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\include;.."
|
AdditionalIncludeDirectories="..\..\include;..;..\..\lib\AsmParser"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__STDC_LIMIT_MACROS"
|
||||||
MinimalRebuild="TRUE"
|
MinimalRebuild="TRUE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -65,7 +65,7 @@
|
|||||||
CharacterSet="2">
|
CharacterSet="2">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="..\..\include;.."
|
AdditionalIncludeDirectories="..\..\include;..;..\..\lib\AsmParser"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__STDC_LIMIT_MACROS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
ForceConformanceInForLoopScope="TRUE"
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
@ -114,16 +114,16 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Flexing $(InputFileName)"
|
Description="Flexing $(InputFileName)"
|
||||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)"
|
CommandLine="..\doflex.cmd debug $(InputName) $(InputPath)"
|
||||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
Outputs="$(InputName).cpp"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Flexing $(InputFileName)"
|
Description="Flexing $(InputFileName)"
|
||||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)"
|
CommandLine="..\doflex.cmd release $(InputName) $(InputPath)"
|
||||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
Outputs="$(InputName).cpp"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -133,20 +133,18 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Bisoning $(InputFileName)"
|
Description="Bisoning $(InputFileName)"
|
||||||
CommandLine="..\tools\bison -pllvmAsm -tvdo$(InputDir)$(InputName).cpp $(InputPath)
|
CommandLine="..\dobison.cmd llvmAsm debug $(InputName) $(InputPath)
|
||||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|
||||||
"
|
"
|
||||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Bisoning $(InputFileName)"
|
Description="Bisoning $(InputFileName)"
|
||||||
CommandLine="..\tools\bison -pllvmAsm -vdo$(InputDir)$(InputName).cpp $(InputPath)
|
CommandLine="..\dobison.cmd llvmAsm release $(InputName) $(InputPath)
|
||||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|
||||||
"
|
"
|
||||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -168,13 +166,13 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|||||||
Name="Generated Files"
|
Name="Generated Files"
|
||||||
Filter="">
|
Filter="">
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\lib\AsmParser\Lexer.cpp">
|
RelativePath="Lexer.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\lib\AsmParser\llvmAsmParser.cpp">
|
RelativePath="llvmAsmParser.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\lib\AsmParser\llvmAsmParser.h">
|
RelativePath="llvmAsmParser.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
|
4
win32/TableGen/.cvsignore
Normal file
4
win32/TableGen/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FileLexer.cpp
|
||||||
|
FileParser.cpp
|
||||||
|
FileParser.h
|
||||||
|
FileParser.output
|
@ -19,7 +19,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\include;.."
|
AdditionalIncludeDirectories="..\..\include;..;..\..\utils\tablegen"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__STDC_LIMIT_MACROS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;__STDC_LIMIT_MACROS"
|
||||||
MinimalRebuild="TRUE"
|
MinimalRebuild="TRUE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -72,7 +72,7 @@
|
|||||||
CharacterSet="2">
|
CharacterSet="2">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="..\..\include;.."
|
AdditionalIncludeDirectories="..\..\include;..;..\..\utils\tablegen"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;__STDC_LIMIT_MACROS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;__STDC_LIMIT_MACROS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
ForceConformanceInForLoopScope="TRUE"
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
@ -142,18 +142,16 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Flexing $(InputFileName)"
|
Description="Flexing $(InputFileName)"
|
||||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)
|
CommandLine="..\doflex.cmd debug $(InputName) $(InputPath)"
|
||||||
"
|
Outputs="$(InputName).cpp"/>
|
||||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Flexing $(InputFileName)"
|
Description="Flexing $(InputFileName)"
|
||||||
CommandLine="..\tools\flex -t >$(InputDir)$(InputName).cpp $(InputPath)
|
CommandLine="..\doflex.cmd release $(InputName) $(InputPath)"
|
||||||
"
|
Outputs="$(InputName).cpp"/>
|
||||||
Outputs="$(InputDir)$(InputName).cpp"/>
|
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -163,20 +161,18 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Bisoning $(InputFileName)"
|
Description="Bisoning $(InputFileName)"
|
||||||
CommandLine="..\tools\bison -pFile -tvdo$(InputDir)$(InputName).cpp $(InputPath)
|
CommandLine="..\dobison.cmd File debug $(InputName) $(InputPath)
|
||||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|
||||||
"
|
"
|
||||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Bisoning $(InputFileName)"
|
Description="Bisoning $(InputFileName)"
|
||||||
CommandLine="..\tools\bison -pFile -vdo$(InputDir)$(InputName).cpp $(InputPath)
|
CommandLine="..\dobison.cmd File release $(InputName) $(InputPath)
|
||||||
move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|
||||||
"
|
"
|
||||||
Outputs="$(InputDir)$(InputName).cpp;$(InputDir)$(InputName).h"/>
|
Outputs="$(InputName).cpp;$(InputName).h"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -240,7 +236,7 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|||||||
Name="Generated Files"
|
Name="Generated Files"
|
||||||
Filter="">
|
Filter="">
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\utils\TableGen\FileLexer.cpp">
|
RelativePath="FileLexer.cpp">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
@ -255,7 +251,7 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\utils\TableGen\fileparser.cpp">
|
RelativePath="fileparser.cpp">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
@ -270,7 +266,7 @@ move $(InputDir)$(InputName).hpp $(InputDir)$(InputName).h
|
|||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\utils\TableGen\fileparser.h">
|
RelativePath="fileparser.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
|
22
win32/dobison.cmd
Executable file
22
win32/dobison.cmd
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
@echo off
|
||||||
|
rem dobison.cmd prefix mode target source
|
||||||
|
rem prefix - passed to bison as -p<prefix>
|
||||||
|
rem mode - either debug or release
|
||||||
|
rem target - generated parser file name without extension
|
||||||
|
rem source - input to bison
|
||||||
|
|
||||||
|
if "%2"=="debug" (set flags=-tvdo) else (set flags=-vdo)
|
||||||
|
|
||||||
|
rem Try and run bison. If it is present, great.
|
||||||
|
bison -p%1 %flags%%3.cpp %4
|
||||||
|
if errorlevel 1 goto error
|
||||||
|
move %3.hpp %3.h
|
||||||
|
goto done
|
||||||
|
|
||||||
|
:error
|
||||||
|
echo Bison could not run. Using pre-generated files.
|
||||||
|
copy %~pn4.cpp %3.cpp
|
||||||
|
copy %~pn4.h %3.h
|
||||||
|
|
||||||
|
:done
|
||||||
|
exit 0
|
19
win32/doflex.cmd
Executable file
19
win32/doflex.cmd
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
@echo off
|
||||||
|
rem doflex.cmd prefix mode target source
|
||||||
|
rem mode - either debug or release
|
||||||
|
rem target - generated parser file name without extension
|
||||||
|
rem source - input to bison
|
||||||
|
|
||||||
|
if "%1"=="debug" (set flags=-t) else (set flags=-t)
|
||||||
|
|
||||||
|
rem Try and run flex. If it is present, great.
|
||||||
|
flex %flags% >%2.cpp %3
|
||||||
|
if errorlevel 1 goto error
|
||||||
|
goto done
|
||||||
|
|
||||||
|
:error
|
||||||
|
echo Flex could not run. Using pre-generated files.
|
||||||
|
copy %~pn3.cpp %2.cpp
|
||||||
|
|
||||||
|
:done
|
||||||
|
exit 0
|
Loading…
x
Reference in New Issue
Block a user