[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [emerge] /: Add modifier option for msvc2013 64bit cross compiler
From: Patrick Spendrin <ps_ml () gmx ! de>
Date: 2015-12-15 23:29:41
Message-ID: E1a8z2L-0005ec-Nq () scm ! kde ! org
[Download RAW message or body]
Git commit e63d3f494df325ce547748144d79171ab52cbb24 by Patrick Spendrin.
Committed on 15/12/2015 at 23:29.
Pushed by sengels into branch 'master'.
Add modifier option for msvc2013 64bit cross compiler
If you want to use the 64 bit cross compiler, then you need to call
x86_amd64 for the vcvarsall.bat
M +4 -2 bin/EmergeSetupHelper.py
M +4 -0 bin/compiler.py
M +3 -0 kdesettings.ini
http://commits.kde.org/emerge/e63d3f494df325ce547748144d79171ab52cbb24
diff --git a/bin/EmergeSetupHelper.py b/bin/EmergeSetupHelper.py
index d2be811..db80cae 100644
--- a/bin/EmergeSetupHelper.py
+++ b/bin/EmergeSetupHelper.py
@@ -89,9 +89,11 @@ class SetupHelper( object ):
"msvc2013": "VS120COMNTOOLS",
"msvc2015": "VS140COMNTOOLS"
}
- architectures = { "x86": "x86", "x64": "amd64" }
+ architectures = { "x86": "x86", "x64": "amd64", "x64_cross": "x86_amd64" \
} + crossmodifier = ""
+ if not compiler.isNative(): crossmodifier="_cross"
status, result = subprocess.getstatusoutput( \
"\"%s\\..\\..\\VC\\vcvarsall.bat\" %s > NUL && set" % (
- os.getenv( compilerDirs[ compiler.getCompilerName( ) ] ), \
architectures[ compiler.architecture( ) ]) ) + os.getenv( \
compilerDirs[ compiler.getCompilerName( ) ] ), architectures[ compiler.architecture( \
) + crossmodifier ]) ) if status != 0:
print( "Failed to setup msvc compiler", file = sys.stderr )
out = self.stringToEnv( result )
diff --git a/bin/compiler.py b/bin/compiler.py
index fa04520..8c3fe5a 100644
--- a/bin/compiler.py
+++ b/bin/compiler.py
@@ -33,6 +33,9 @@ def _getGCCTarget():
def architecture():
return emergeSettings.get("General", "Architecture" )
+def isNative():
+ return emergeSettings.getboolean("General", "Native", True)
+
def isX64():
return architecture() == "x64"
@@ -140,5 +143,6 @@ if __name__ == '__main__':
print("Testing Compiler.py")
print("Version: %s" % getVersion())
print("Compiler Name: %s" % getCompilerName())
+ print("Native compiler: %s" % ("No", "Yes")[isNative()])
print("Compiler Version: %s" % getMinGWVersion())
diff --git a/kdesettings.ini b/kdesettings.ini
index ef222f9..5f0c4f2 100644
--- a/kdesettings.ini
+++ b/kdesettings.ini
@@ -11,6 +11,9 @@
KDECOMPILER = mingw4
## possible values x86 or x64
Architecture = x86
+## This option should be set to False if you use the msvc 201X Express Edition 64bit \
compiler +## in all other cases, simply keep this option commented out
+#Native=False
## This option can be used to override the default make program
## change the value to the path of the executable you want to use instead.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic