Eliminate the use of the global variable hack in the X86 target that was used
authorJeff Cohen <jeffc@jolt-lang.org>
Sun, 2 Jan 2005 04:23:12 +0000 (04:23 +0000)
committerJeff Cohen <jeffc@jolt-lang.org>
Sun, 2 Jan 2005 04:23:12 +0000 (04:23 +0000)
to get Visual Studio to link in X86.lib to the executables that need it.  There
is another way of doing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19252 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetMachine.cpp
win32/Fibonacci/Fibonacci.vcproj
win32/llc/llc.vcproj
win32/lli/lli.vcproj
win32/llvm.sln

index 0e3eea439242953d4031d576b526de218be71873..24406d5be97e0d3aef016cc6b503061dd6101b2b 100644 (file)
@@ -27,13 +27,6 @@ using namespace llvm;
 
 X86VectorEnum llvm::X86Vector = NoSSE;
 
-/// X86TargetMachineModule - Note that this is used on hosts that cannot link
-/// in a library unless there are references into the library.  In particular,
-/// it seems that it is not possible to get things to work on Win32 without
-/// this.  Though it is unused, do not remove it.
-extern "C" int X86TargetMachineModule;
-int X86TargetMachineModule = 0;
-
 namespace {
   cl::opt<bool> NoSSAPeephole("disable-ssa-peephole", cl::init(true),
                         cl::desc("Disable the ssa-based peephole optimizer "
index 03f3c35c6aeef079cf5c259b8952d5bba6a3473b..9dd6f9fd2f1a856d39d435d70b7564eb76e26a14 100644 (file)
@@ -37,9 +37,9 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="$(SolutionDir)X86\$(IntDir)\X86TargetMachine.obj"
                                OutputFile="$(OutDir)/Fibonacci.exe"
                                LinkIncremental="2"
-                               ForceSymbolReferences="_X86TargetMachineModule"
                                GenerateDebugInformation="TRUE"
                                ProgramDatabaseFile="$(OutDir)/Fibonacci.pdb"
                                SubSystem="1"
@@ -88,9 +88,9 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="$(SolutionDir)X86\$(IntDir)\X86TargetMachine.obj"
                                OutputFile="$(OutDir)/Fibonacci.exe"
                                LinkIncremental="1"
-                               ForceSymbolReferences="_X86TargetMachineModule"
                                GenerateDebugInformation="TRUE"
                                SubSystem="1"
                                OptimizeReferences="2"
index 69111f8692dab9f89e1d0b877b456e152000aeaa..a5eb134a771c4597df8365799b15ac0be01c28bd 100644 (file)
@@ -36,9 +36,9 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="$(SolutionDir)X86\$(IntDir)\X86TargetMachine.obj"
                                OutputFile="$(OutDir)/llc.exe"
                                LinkIncremental="2"
-                               ForceSymbolReferences="_X86TargetMachineModule"
                                GenerateDebugInformation="TRUE"
                                ProgramDatabaseFile="$(OutDir)/llc.pdb"
                                SubSystem="1"
@@ -87,9 +87,9 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="$(SolutionDir)X86\$(IntDir)\X86TargetMachine.obj"
                                OutputFile="$(OutDir)/llc.exe"
                                LinkIncremental="1"
-                               ForceSymbolReferences="_X86TargetMachineModule"
                                GenerateDebugInformation="TRUE"
                                SubSystem="1"
                                OptimizeReferences="2"
index 0f3127f91ffdb417b99ba4492e7933d3e9307329..0aae82f72b984ecaec5176ab3a2ded5d4ed6308b 100644 (file)
@@ -36,9 +36,9 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="$(SolutionDir)X86\$(IntDir)\X86TargetMachine.obj"
                                OutputFile="$(OutDir)/lli.exe"
                                LinkIncremental="2"
-                               ForceSymbolReferences="_X86TargetMachineModule"
                                GenerateDebugInformation="TRUE"
                                ProgramDatabaseFile="$(OutDir)/lli.pdb"
                                SubSystem="1"
@@ -87,9 +87,9 @@
                                Name="VCCustomBuildTool"/>
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="$(SolutionDir)X86\$(IntDir)\X86TargetMachine.obj"
                                OutputFile="$(OutDir)/lli.exe"
                                LinkIncremental="1"
-                               ForceSymbolReferences="_X86TargetMachineModule"
                                GenerateDebugInformation="TRUE"
                                SubSystem="1"
                                OptimizeReferences="2"
index 42ad9b793df4ab5e332fa9157dcd06d97ba0da97..1474da40175305f8043f64e5c8124f23f505a774 100644 (file)
@@ -20,6 +20,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fibonacci", "Fibonacci\Fibo
                {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}
                {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A}
                {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}
+               {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExecutionEngine", "ExecutionEngine\ExecutionEngine.vcproj", "{76295AE8-A083-460E-9F80-6F2B8923264A}"