-
Notifications
You must be signed in to change notification settings - Fork 146
JDK-8211307: Add prefix to build tools paths #283
Changes from 3 commits
c2d6e43
8cf1e76
2e71bfa
e915f70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,9 @@ defineProperty("MACOSX_MIN_VERSION", "10.10"); | |
setupTools("mac_tools", | ||
{ propFile -> | ||
propFile << "" | ||
if (!file(defaultSdkPath).isDirectory()) { | ||
if (project.hasProperty('setupMacTools')) { | ||
setupMacTools(propFile) | ||
} else if (!file(defaultSdkPath).isDirectory()) { | ||
// Get list of all macosx sdks | ||
ByteArrayOutputStream results = new ByteArrayOutputStream(); | ||
exec { | ||
|
@@ -126,9 +128,15 @@ def linkFlags = [ | |
"-framework", "Security", | ||
"-dynamiclib", "-lobjc"].flatten(); | ||
|
||
def toolchainDir | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can toolchainDir be String instead of def ? |
||
if (hasProperty('toolchainDir')) { | ||
toolchainDir = ext.toolchainDir + "/" | ||
} else { | ||
toolchainDir = "" | ||
} | ||
|
||
def compiler = IS_COMPILE_PARFAIT ? "parfait-clang" : "clang"; | ||
def linker = IS_COMPILE_PARFAIT ? "parfait-clang++" : "clang++"; | ||
def compiler = IS_COMPILE_PARFAIT ? "parfait-clang" : "${toolchainDir}clang"; | ||
def linker = IS_COMPILE_PARFAIT ? "parfait-clang++" : "${toolchainDir}clang++"; | ||
|
||
MAC.glass = [:] | ||
MAC.glass.javahInclude = [ | ||
|
@@ -208,4 +216,8 @@ MAC.media.compiler = "${compiler} ${ccBaseFlags.join(" ")}" | |
//MAC.media.ccFlags = ccBaseFlags | ||
MAC.media.linker = "${linker} ${commonParams.join(" ")}" | ||
//MAC.media.linkFlags = commonParams | ||
MAC.media.ar = "libtool" | ||
MAC.media.ar = "${toolchainDir}libtool" | ||
|
||
MAC.webkit = [:] | ||
MAC.webkit.compiler = compiler | ||
MAC.webkit.linker = linker |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,26 +41,30 @@ WIN.modLibDest = "lib" | |
|
||
setupTools("windows_tools", | ||
{ propFile -> | ||
// Create the properties file | ||
ByteArrayOutputStream results = new ByteArrayOutputStream(); | ||
String winsdkDir = System.getenv().get("WINSDK_DIR"); | ||
exec({ | ||
environment([ | ||
"WINSDKPATH" : winsdkDir == null ? "" : winsdkDir, | ||
"CONF" : "/$CONF", // TODO does this mean the generated properties must be reset when in a different configuration? | ||
"VCARCH" : IS_64 ? "amd64" : "x86", | ||
"SDKARCH" : IS_64 ? "/x64" : "/x86", | ||
]); | ||
commandLine("cmd", "/q", "/c", "buildSrc\\genVSproperties.bat"); | ||
setStandardOutput(results); | ||
}); | ||
BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim())); | ||
reader.readLine(); | ||
reader.readLine(); | ||
String line; | ||
while ((line = reader.readLine()) != null && !line.startsWith("######")) { | ||
line = line.replace("\\", "/").replace("/@@ENDOFLINE@@", "").replace("@@ENDOFLINE@@", "").replace("//", "/").replace("windows.vs.", "WINDOWS_VS_"); | ||
propFile << line << "\r\n"; | ||
if (project.hasProperty('setupWinTools')) { | ||
setupWinTools(propFile) | ||
} else { | ||
// Create the properties file | ||
ByteArrayOutputStream results = new ByteArrayOutputStream(); | ||
String winsdkDir = System.getenv().get("WINSDK_DIR"); | ||
exec({ | ||
environment([ | ||
"WINSDKPATH" : winsdkDir == null ? "" : winsdkDir, | ||
"CONF" : "/$CONF", // TODO does this mean the generated properties must be reset when in a different configuration? | ||
"VCARCH" : IS_64 ? "amd64" : "x86", | ||
"SDKARCH" : IS_64 ? "/x64" : "/x86", | ||
]); | ||
commandLine("cmd", "/q", "/c", "buildSrc\\genVSproperties.bat"); | ||
setStandardOutput(results); | ||
}); | ||
BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim())); | ||
reader.readLine(); | ||
reader.readLine(); | ||
String line; | ||
while ((line = reader.readLine()) != null && !line.startsWith("######")) { | ||
line = line.replace("\\", "/").replace("/@@ENDOFLINE@@", "").replace("@@ENDOFLINE@@", "").replace("//", "/").replace("windows.vs.", "WINDOWS_VS_"); | ||
propFile << line << "\r\n"; | ||
} | ||
} | ||
}, | ||
{ properties -> | ||
|
@@ -133,7 +137,9 @@ ext.WINDOWS_NATIVE_COMPILE_ENVIRONMENT = [ | |
]; | ||
def msvcVer = System.getenv("MSVC_VER") ?: "14.10.25017" | ||
def msvcBinDir = "" | ||
if (winVsVer == 150) { | ||
if (hasProperty('toolchainDir')) { | ||
msvcBinDir = "$WINDOWS_VS_VSINSTALLDIR/VC/bin/${IS_64 ? 'x64' : 'x86'}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The msvcRedstDir will likely need similar treatment (i.e., a different directory when using toolchainDir). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. I will fix it. |
||
} else if (winVsVer == 150) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can compare with WINDOWS_CRT_VER ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This would be an intrusive and possibly risky change. Let's leave it as is for now. |
||
msvcBinDir = (IS_64 | ||
? "$WINDOWS_VS_VSINSTALLDIR/VC/Tools/MSVC/$msvcVer/bin/HostX64/x64" | ||
: "$WINDOWS_VS_VSINSTALLDIR/VC/Tools/MSVC/$msvcVer/bin/HostX86/x86") | ||
|
@@ -155,7 +161,6 @@ if (!file(cygpath("$winSdkBinDir/RC.Exe")).exists()) { | |
winSdkBinDir += "/" + (IS_64 ? "x64" : "x86") | ||
} | ||
} | ||
println "winSdkBinDir=$winSdkBinDir" | ||
|
||
ext.RC = cygpath("$winSdkBinDir/rc.exe") | ||
def rcCompiler = RC | ||
|
@@ -427,6 +432,8 @@ WIN.media.linker = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-link.exe" : "lin | |
WIN.media.ar = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-lib.exe" : "lib.exe"; | ||
|
||
WIN.webkit = [:] | ||
WIN.webkit.compiler = compiler | ||
WIN.webkit.linker = linker | ||
WIN.webkit.rcCompiler = rcCompiler | ||
WIN.webkit.rcSource = defaultRcSource | ||
WIN.webkit.rcFlags = ["/d", "JFX_FNAME=jfxwebkit.dll", "/d", "JFX_INTERNAL_NAME=webkit", rcFlags].flatten(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can toolchainDir be String instead of def ?