< prev index next >

make/src/classes/build/tools/projectcreator/BuildConfig.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 20,86 **** * or visit www.oracle.com if you need additional information or have any * questions. * */ ! import java.util.*; ! import java.io.File; class BuildConfig { Hashtable vars; ! Vector basicNames, basicPaths; String[] context; static CompilerInterface ci; static CompilerInterface getCI() { if (ci == null) { String comp = (String)getField(null, "CompilerVersion"); try { ! ci = (CompilerInterface)Class.forName("CompilerInterface" + comp).newInstance(); } catch (Exception cnfe) { System.err.println("Cannot find support for compiler " + comp); throw new RuntimeException(cnfe.toString()); } } return ci; } protected void initNames(String flavour, String build, String outDll) { if (vars == null) vars = new Hashtable(); String flavourBuild = flavour + "_" + build; System.out.println(); System.out.println(flavourBuild); ! put("Name", getCI().makeCfgName(flavourBuild)); put("Flavour", flavour); put("Build", build); // ones mentioned above were needed to expand format String buildBase = expandFormat(getFieldString(null, "BuildBase")); - String jdkDir = getFieldString(null, "JdkTargetRoot"); String sourceBase = getFieldString(null, "SourceBase"); String outDir = buildBase; put("Id", flavourBuild); put("OutputDir", outDir); put("SourceBase", sourceBase); put("BuildBase", buildBase); ! put("OutputDll", jdkDir + Util.sep + outDll); context = new String [] {flavourBuild, flavour, build, null}; } ! protected void init(Vector includes, Vector defines) { initDefaultDefines(defines); initDefaultCompilerFlags(includes); initDefaultLinkerFlags(); ! handleDB(); } ! protected void initDefaultCompilerFlags(Vector includes) { Vector compilerFlags = new Vector(); compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"), includes, get("OutputDir"))); --- 20,100 ---- * or visit www.oracle.com if you need additional information or have any * questions. * */ ! package build.tools.projectcreator; ! ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Vector; class BuildConfig { + @SuppressWarnings("rawtypes") Hashtable vars; ! Vector<String> basicNames, basicPaths; String[] context; static CompilerInterface ci; static CompilerInterface getCI() { if (ci == null) { String comp = (String)getField(null, "CompilerVersion"); try { ! ci = (CompilerInterface)Class.forName("build.tools.projectcreator.CompilerInterface" + comp).newInstance(); } catch (Exception cnfe) { System.err.println("Cannot find support for compiler " + comp); throw new RuntimeException(cnfe.toString()); } } return ci; } + @SuppressWarnings("rawtypes") protected void initNames(String flavour, String build, String outDll) { if (vars == null) vars = new Hashtable(); String flavourBuild = flavour + "_" + build; + String platformName = getFieldString(null, "PlatformName"); System.out.println(); System.out.println(flavourBuild); ! put("Name", getCI().makeCfgName(flavourBuild, platformName)); put("Flavour", flavour); put("Build", build); + put("PlatformName", platformName); // ones mentioned above were needed to expand format String buildBase = expandFormat(getFieldString(null, "BuildBase")); String sourceBase = getFieldString(null, "SourceBase"); + String buildSpace = getFieldString(null, "BuildSpace"); String outDir = buildBase; + String jdkTargetRoot = getFieldString(null, "JdkTargetRoot"); + String makeBinary = getFieldString(null, "MakeBinary"); + String makeOutput = expandFormat(getFieldString(null, "MakeOutput")); put("Id", flavourBuild); put("OutputDir", outDir); put("SourceBase", sourceBase); put("BuildBase", buildBase); ! put("BuildSpace", buildSpace); ! put("OutputDll", outDir + Util.sep + outDll); ! put("JdkTargetRoot", jdkTargetRoot); ! put("MakeBinary", makeBinary); ! put("MakeOutput", makeOutput); context = new String [] {flavourBuild, flavour, build, null}; } ! protected void init(Vector<String> includes, Vector<String> defines) { initDefaultDefines(defines); initDefaultCompilerFlags(includes); initDefaultLinkerFlags(); ! //handleDB(); } ! protected void initDefaultCompilerFlags(Vector<String> includes) { Vector compilerFlags = new Vector(); compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"), includes, get("OutputDir")));
*** 89,264 **** } protected void initDefaultLinkerFlags() { Vector linkerFlags = new Vector(); ! linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"))); put("LinkerFlags", linkerFlags); } ! DirectoryTree getSourceTree(String sourceBase, String startAt) { ! DirectoryTree tree = new DirectoryTree(); ! ! tree.addSubdirToIgnore("Codemgr_wsdata"); ! tree.addSubdirToIgnore("deleted_files"); ! tree.addSubdirToIgnore("SCCS"); ! tree.setVerbose(true); ! if (startAt != null) { ! tree.readDirectory(sourceBase + File.separator + startAt); ! } else { ! tree.readDirectory(sourceBase); } ! ! return tree; } ! ! Vector getPreferredPaths(MacroDefinitions macros) { ! Vector preferredPaths = new Vector(); ! // In the case of multiple files with the same name in ! // different subdirectories, prefer the versions specified in ! // the platform file as the "os_family" and "arch" macros. ! for (Iterator iter = macros.getMacros(); iter.hasNext(); ) { ! Macro macro = (Macro) iter.next(); ! if (macro.name.equals("os_family") || ! macro.name.equals("arch")) { ! preferredPaths.add(macro.contents); } } ! // Also prefer "opto" over "adlc" for adlcVMDeps.hpp ! preferredPaths.add("opto"); ! ! return preferredPaths; } ! void handleDB() { ! WinGammaPlatform platform = (WinGammaPlatform)getField(null, "PlatformObject"); ! ! File incls = new File(get("OutputDir")+Util.sep+"incls"); ! ! incls.mkdirs(); ! ! MacroDefinitions macros = new MacroDefinitions(); ! try { ! macros.readFrom(getFieldString(null, "Platform"), false); ! } catch (Exception e) { ! throw new RuntimeException(e); } ! ! putSpecificField("AllFilesHash", computeAllFiles(platform, macros)); } ! ! private boolean matchesIgnoredPath(String prefixedName) { ! Vector rv = new Vector(); ! collectRelevantVectors(rv, "IgnorePath"); ! for (Iterator i = rv.iterator(); i.hasNext(); ) { ! String pathPart = (String) i.next(); ! if (prefixedName.contains(Util.normalize(pathPart))) { return true; } } return false; } ! void addAll(Iterator i, Hashtable hash, ! WinGammaPlatform platform, DirectoryTree tree, ! Vector preferredPaths, Vector filesNotFound, Vector filesDuplicate) { ! for (; i.hasNext(); ) { ! String fileName = (String) i.next(); ! if (lookupHashFieldInContext("IgnoreFile", fileName) == null) { ! String prefixedName = platform.envVarPrefixedFileName(fileName, ! 0, /* ignored */ ! tree, ! preferredPaths, ! filesNotFound, ! filesDuplicate); ! if (prefixedName != null) { ! prefixedName = Util.normalize(prefixedName); ! if (!matchesIgnoredPath(prefixedName)) { ! addTo(hash, prefixedName, fileName); } } } } } ! void addTo(Hashtable ht, String key, String value) { ! ht.put(expandFormat(key), expandFormat(value)); } ! Hashtable computeAllFiles(WinGammaPlatform platform, MacroDefinitions macros) { ! Hashtable rv = new Hashtable(); ! DirectoryTree tree = getSourceTree(get("SourceBase"), getFieldString(null, "StartAt")); ! Vector preferredPaths = getPreferredPaths(macros); ! ! // Hold errors until end ! Vector filesNotFound = new Vector(); ! Vector filesDuplicate = new Vector(); ! ! Vector includedFiles = new Vector(); ! ! // find all files ! Vector dirs = getSourceIncludes(); ! for (Iterator i = dirs.iterator(); i.hasNext(); ) { ! String dir = (String)i.next(); ! DirectoryTree subtree = getSourceTree(dir, null); ! for (Iterator fi = subtree.getFileIterator(); fi.hasNext(); ) { ! String name = ((File)fi.next()).getName(); ! includedFiles.add(name); ! } ! } ! addAll(includedFiles.iterator(), rv, ! platform, tree, ! preferredPaths, filesNotFound, filesDuplicate); ! ! Vector addFiles = new Vector(); ! collectRelevantVectors(addFiles, "AdditionalFile"); ! addAll(addFiles.iterator(), rv, ! platform, tree, ! preferredPaths, filesNotFound, filesDuplicate); ! ! collectRelevantHashes(rv, "AdditionalGeneratedFile"); ! ! if ((filesNotFound.size() != 0) || ! (filesDuplicate.size() != 0)) { ! System.err.println("Error: some files were not found or " + ! "appeared in multiple subdirectories of " + ! "directory " + get("SourceBase") + " and could not " + ! "be resolved with the os_family and arch " + ! "macros in the platform file."); ! if (filesNotFound.size() != 0) { ! System.err.println("Files not found:"); ! for (Iterator iter = filesNotFound.iterator(); ! iter.hasNext(); ) { ! System.err.println(" " + (String) iter.next()); ! } ! } ! if (filesDuplicate.size() != 0) { ! System.err.println("Duplicate files:"); ! for (Iterator iter = filesDuplicate.iterator(); ! iter.hasNext(); ) { ! System.err.println(" " + (String) iter.next()); } } - throw new RuntimeException(); } ! return rv; } void initDefaultDefines(Vector defines) { Vector sysDefines = new Vector(); sysDefines.add("WIN32"); sysDefines.add("_WINDOWS"); ! sysDefines.add("HOTSPOT_BUILD_USER="+System.getProperty("user.name")); sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\""); sysDefines.add("_JNI_IMPLEMENTATION_"); sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\""); ! sysDefines.addAll(defines); put("Define", sysDefines); } --- 103,238 ---- } protected void initDefaultLinkerFlags() { Vector linkerFlags = new Vector(); ! linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"), get("PlatformName"))); put("LinkerFlags", linkerFlags); } ! public boolean matchesIgnoredPath(String path) { ! Vector<String> rv = new Vector<String>(); ! collectRelevantVectors(rv, "IgnorePath"); ! for (String pathPart : rv) { ! if (path.contains(pathPart)) { ! return true; } ! } ! return false; } ! public boolean matchesHidePath(String path) { ! Vector<String> rv = new Vector<String>(); ! collectRelevantVectors(rv, "HidePath"); ! for (String pathPart : rv) { ! if (path.contains(Util.normalize(pathPart))) { ! return true; } } ! return false; } + public Vector<String> matchesAdditionalGeneratedPath(String fullPath) { + Vector<String> rv = new Vector<String>(); + Hashtable<String, String> v = (Hashtable<String, String>)BuildConfig.getField(this.toString(), "AdditionalGeneratedFile"); + if (v != null) { + for (Enumeration<String> e=v.keys(); e.hasMoreElements(); ) { + String key = e.nextElement(); + String val = v.get(key); ! if (fullPath.endsWith(expandFormat(key))) { ! rv.add(expandFormat(val)); } ! } ! } ! return rv; } ! // Returns true if the specified path refers to a relative alternate ! // source file. RelativeAltSrcInclude is usually "src\closed". ! public static boolean matchesRelativeAltSrcInclude(String path) { ! String relativeAltSrcInclude = ! getFieldString(null, "RelativeAltSrcInclude"); ! Vector<String> v = getFieldVector(null, "AltRelativeInclude"); ! if (v != null) { ! for (String pathPart : v) { ! if (path.contains(relativeAltSrcInclude + Util.sep + pathPart)) { return true; } } + } return false; } ! // Returns the relative alternate source file for the specified path. ! // Null is returned if the specified path does not have a matching ! // alternate source file. ! public static String getMatchingRelativeAltSrcFile(String path) { ! Vector<String> v = getFieldVector(null, "RelativeAltSrcFileList"); ! if (v == null) { ! return null; } + for (String pathPart : v) { + if (path.endsWith(pathPart)) { + String relativeAltSrcInclude = + getFieldString(null, "RelativeAltSrcInclude"); + return relativeAltSrcInclude + Util.sep + pathPart; } } + return null; } + + // Returns true if the specified path has a matching alternate + // source file. + public static boolean matchesRelativeAltSrcFile(String path) { + return getMatchingRelativeAltSrcFile(path) != null; } ! // Track the specified alternate source file. The source file is ! // tracked without the leading .*<sep><RelativeAltSrcFileList><sep> ! // part to make matching regular source files easier. ! public static void trackRelativeAltSrcFile(String path) { ! String pattern = getFieldString(null, "RelativeAltSrcInclude") + ! Util.sep; ! int altSrcInd = path.indexOf(pattern); ! if (altSrcInd == -1) { ! // not an AltSrc path ! return; } ! altSrcInd += pattern.length(); ! if (altSrcInd >= path.length()) { ! // not a valid AltSrc path ! return; } + + String altSrcFile = path.substring(altSrcInd); + Vector v = getFieldVector(null, "RelativeAltSrcFileList"); + if (v == null || !v.contains(altSrcFile)) { + addFieldVector(null, "RelativeAltSrcFileList", altSrcFile); } } ! void addTo(Hashtable ht, String key, String value) { ! ht.put(expandFormat(key), expandFormat(value)); } void initDefaultDefines(Vector defines) { Vector sysDefines = new Vector(); sysDefines.add("WIN32"); sysDefines.add("_WINDOWS"); ! sysDefines.add("HOTSPOT_BUILD_USER=\\\""+System.getProperty("user.name")+"\\\""); sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\""); + sysDefines.add("INCLUDE_TRACE=1"); sysDefines.add("_JNI_IMPLEMENTATION_"); + if (vars.get("PlatformName").equals("Win32")) { sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\""); ! } else { ! sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\""); ! } ! sysDefines.add("DEBUG_LEVEL=\\\"" + get("Build")+"\\\""); sysDefines.addAll(defines); put("Define", sysDefines); }
*** 328,351 **** void putSpecificField(String field, Object value) { putField(get("Id"), field, value); } void collectRelevantVectors(Vector rv, String field) { ! for (int i = 0; i < context.length; i++) { ! Vector v = getFieldVector(context[i], field); if (v != null) { ! for (Iterator j=v.iterator(); j.hasNext(); ) { ! String val = (String)j.next(); ! rv.add(expandFormat(val)); } } } } void collectRelevantHashes(Hashtable rv, String field) { ! for (int i = 0; i < context.length; i++) { ! Hashtable v = (Hashtable)getField(context[i], field); if (v != null) { for (Enumeration e=v.keys(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); String val = (String)v.get(key); addTo(rv, key, val); --- 302,324 ---- void putSpecificField(String field, Object value) { putField(get("Id"), field, value); } void collectRelevantVectors(Vector rv, String field) { ! for (String ctx : context) { ! Vector<String> v = getFieldVector(ctx, field); if (v != null) { ! for (String val : v) { ! rv.add(expandFormat(val).replace('/', '\\')); } } } } void collectRelevantHashes(Hashtable rv, String field) { ! for (String ctx : context) { ! Hashtable v = (Hashtable)getField(ctx, field); if (v != null) { for (Enumeration e=v.keys(); e.hasMoreElements(); ) { String key = (String)e.nextElement(); String val = (String)v.get(key); addTo(rv, key, val);
*** 361,408 **** return rv; } Vector getIncludes() { Vector rv = new Vector(); - collectRelevantVectors(rv, "AbsoluteInclude"); - rv.addAll(getSourceIncludes()); - return rv; } private Vector getSourceIncludes() { ! Vector rv = new Vector(); ! Vector ri = new Vector(); String sourceBase = getFieldString(null, "SourceBase"); collectRelevantVectors(ri, "RelativeInclude"); ! for (Iterator i = ri.iterator(); i.hasNext(); ) { ! String f = (String)i.next(); rv.add(sourceBase + Util.sep + f); } return rv; } static Hashtable cfgData = new Hashtable(); static Hashtable globalData = new Hashtable(); static boolean appliesToTieredBuild(String cfg) { return (cfg != null && ! (cfg.startsWith("compiler1") || ! cfg.startsWith("compiler2"))); } // Filters out the IgnoreFile and IgnorePaths since they are // handled specially for tiered builds. static boolean appliesToTieredBuild(String cfg, String key) { return (appliesToTieredBuild(cfg))&& (key != null && !key.startsWith("Ignore")); } static String getTieredBuildCfg(String cfg) { assert appliesToTieredBuild(cfg) : "illegal configuration " + cfg; ! return "tiered" + cfg.substring(9); } static Object getField(String cfg, String field) { if (cfg == null) { return globalData.get(field); --- 334,387 ---- return rv; } Vector getIncludes() { Vector rv = new Vector(); collectRelevantVectors(rv, "AbsoluteInclude"); rv.addAll(getSourceIncludes()); return rv; } private Vector getSourceIncludes() { ! Vector<String> rv = new Vector<String>(); String sourceBase = getFieldString(null, "SourceBase"); + + // add relative alternate source include values: + String relativeAltSrcInclude = + getFieldString(null, "RelativeAltSrcInclude"); + Vector<String> asri = new Vector<String>(); + collectRelevantVectors(asri, "AltRelativeInclude"); + for (String f : asri) { + rv.add(sourceBase + Util.sep + relativeAltSrcInclude + + Util.sep + f); + } + + Vector<String> ri = new Vector<String>(); collectRelevantVectors(ri, "RelativeInclude"); ! for (String f : ri) { rv.add(sourceBase + Util.sep + f); } return rv; } static Hashtable cfgData = new Hashtable(); static Hashtable globalData = new Hashtable(); static boolean appliesToTieredBuild(String cfg) { return (cfg != null && ! cfg.startsWith("server")); } // Filters out the IgnoreFile and IgnorePaths since they are // handled specially for tiered builds. static boolean appliesToTieredBuild(String cfg, String key) { return (appliesToTieredBuild(cfg))&& (key != null && !key.startsWith("Ignore")); } static String getTieredBuildCfg(String cfg) { assert appliesToTieredBuild(cfg) : "illegal configuration " + cfg; ! return "server"; } static Object getField(String cfg, String field) { if (cfg == null) { return globalData.get(field);
*** 530,611 **** defines.add("_DEBUG"); defines.add("ASSERT"); super.init(includes, defines); ! getV("CompilerFlags").addAll(getCI().getDebugCompilerFlags(getOptFlag())); getV("LinkerFlags").addAll(getCI().getDebugLinkerFlags()); } } ! class C1DebugConfig extends GenericDebugConfig { ! String getOptFlag() { ! return getCI().getNoOptFlag(); ! } ! ! C1DebugConfig() { ! initNames("compiler1", "debug", "fastdebug\\jre\\bin\\client\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! class C1FastDebugConfig extends GenericDebugConfig { ! String getOptFlag() { ! return getCI().getOptFlag(); } - - C1FastDebugConfig() { - initNames("compiler1", "fastdebug", "fastdebug\\jre\\bin\\client\\jvm.dll"); - init(getIncludes(), getDefines()); } } ! class C2DebugConfig extends GenericDebugConfig { String getOptFlag() { return getCI().getNoOptFlag(); } ! C2DebugConfig() { ! initNames("compiler2", "debug", "fastdebug\\jre\\bin\\server\\jvm.dll"); init(getIncludes(), getDefines()); } } ! class C2FastDebugConfig extends GenericDebugConfig { String getOptFlag() { return getCI().getOptFlag(); } ! C2FastDebugConfig() { ! initNames("compiler2", "fastdebug", "fastdebug\\jre\\bin\\server\\jvm.dll"); init(getIncludes(), getDefines()); } } ! class TieredDebugConfig extends GenericDebugConfig { String getOptFlag() { return getCI().getNoOptFlag(); } TieredDebugConfig() { ! initNames("tiered", "debug", "fastdebug\\jre\\bin\\server\\jvm.dll"); init(getIncludes(), getDefines()); } } ! class TieredFastDebugConfig extends GenericDebugConfig { String getOptFlag() { return getCI().getOptFlag(); } TieredFastDebugConfig() { ! initNames("tiered", "fastdebug", "fastdebug\\jre\\bin\\server\\jvm.dll"); init(getIncludes(), getDefines()); } } - abstract class ProductConfig extends BuildConfig { protected void init(Vector includes, Vector defines) { defines.add("NDEBUG"); defines.add("PRODUCT"); --- 509,576 ---- defines.add("_DEBUG"); defines.add("ASSERT"); super.init(includes, defines); ! getV("CompilerFlags").addAll(getCI().getDebugCompilerFlags(getOptFlag(), get("PlatformName"))); getV("LinkerFlags").addAll(getCI().getDebugLinkerFlags()); } } ! abstract class GenericDebugNonKernelConfig extends GenericDebugConfig { ! protected void init(Vector includes, Vector defines) { ! super.init(includes, defines); ! if (get("PlatformName").equals("Win32")) { ! getCI().getAdditionalNonKernelLinkerFlags(getV("LinkerFlags")); } } } ! class C1DebugConfig extends GenericDebugNonKernelConfig { String getOptFlag() { return getCI().getNoOptFlag(); } ! C1DebugConfig() { ! initNames("client", "debug", "jvm.dll"); init(getIncludes(), getDefines()); } } ! class C1FastDebugConfig extends GenericDebugNonKernelConfig { String getOptFlag() { return getCI().getOptFlag(); } ! C1FastDebugConfig() { ! initNames("client", "fastdebug", "jvm.dll"); init(getIncludes(), getDefines()); } } ! class TieredDebugConfig extends GenericDebugNonKernelConfig { String getOptFlag() { return getCI().getNoOptFlag(); } TieredDebugConfig() { ! initNames("server", "debug", "jvm.dll"); init(getIncludes(), getDefines()); } } ! class TieredFastDebugConfig extends GenericDebugNonKernelConfig { String getOptFlag() { return getCI().getOptFlag(); } TieredFastDebugConfig() { ! initNames("server", "fastdebug", "jvm.dll"); init(getIncludes(), getDefines()); } } abstract class ProductConfig extends BuildConfig { protected void init(Vector includes, Vector defines) { defines.add("NDEBUG"); defines.add("PRODUCT");
*** 616,716 **** } } class C1ProductConfig extends ProductConfig { C1ProductConfig() { ! initNames("compiler1", "product", "jre\\bin\\client\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! class C2ProductConfig extends ProductConfig { ! C2ProductConfig() { ! initNames("compiler2", "product", "jre\\bin\\server\\jvm.dll"); init(getIncludes(), getDefines()); } } class TieredProductConfig extends ProductConfig { TieredProductConfig() { ! initNames("tiered", "product", "jre\\bin\\server\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! ! class CoreDebugConfig extends GenericDebugConfig { ! String getOptFlag() { ! return getCI().getNoOptFlag(); ! } ! ! CoreDebugConfig() { ! initNames("core", "debug", "fastdebug\\jre\\bin\\core\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! ! class CoreFastDebugConfig extends GenericDebugConfig { ! String getOptFlag() { ! return getCI().getOptFlag(); ! } ! ! CoreFastDebugConfig() { ! initNames("core", "fastdebug", "fastdebug\\jre\\bin\\core\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! ! class CoreProductConfig extends ProductConfig { ! CoreProductConfig() { ! initNames("core", "product", "jre\\bin\\core\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! class KernelDebugConfig extends GenericDebugConfig { ! String getOptFlag() { ! return getCI().getNoOptFlag(); ! } ! ! KernelDebugConfig() { ! initNames("kernel", "debug", "fastdebug\\jre\\bin\\kernel\\jvm.dll"); ! init(getIncludes(), getDefines()); ! } ! } ! ! ! class KernelFastDebugConfig extends GenericDebugConfig { ! String getOptFlag() { ! return getCI().getOptFlag(); ! } ! ! KernelFastDebugConfig() { ! initNames("kernel", "fastdebug", "fastdebug\\jre\\bin\\kernel\\jvm.dll"); init(getIncludes(), getDefines()); } } - class KernelProductConfig extends ProductConfig { - KernelProductConfig() { - initNames("kernel", "product", "jre\\bin\\kernel\\jvm.dll"); - init(getIncludes(), getDefines()); - } - } abstract class CompilerInterface { abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir); ! abstract Vector getBaseLinkerFlags(String outDir, String outDll); ! abstract Vector getDebugCompilerFlags(String opt); abstract Vector getDebugLinkerFlags(); abstract Vector getProductCompilerFlags(); abstract Vector getProductLinkerFlags(); abstract String getOptFlag(); abstract String getNoOptFlag(); ! abstract String makeCfgName(String flavourBuild); void addAttr(Vector receiver, String attr, String value) { receiver.add(attr); receiver.add(value); } } --- 581,624 ---- } } class C1ProductConfig extends ProductConfig { C1ProductConfig() { ! initNames("client", "product", "jvm.dll"); init(getIncludes(), getDefines()); } } class TieredProductConfig extends ProductConfig { TieredProductConfig() { ! initNames("server", "product", "jvm.dll"); init(getIncludes(), getDefines()); } } abstract class CompilerInterface { abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir); ! abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName); ! abstract Vector getDebugCompilerFlags(String opt, String platformName); abstract Vector getDebugLinkerFlags(); + abstract void getAdditionalNonKernelLinkerFlags(Vector rv); abstract Vector getProductCompilerFlags(); abstract Vector getProductLinkerFlags(); abstract String getOptFlag(); abstract String getNoOptFlag(); ! abstract String makeCfgName(String flavourBuild, String platformName); void addAttr(Vector receiver, String attr, String value) { receiver.add(attr); receiver.add(value); } + void extAttr(Vector receiver, String attr, String value) { + int attr_pos=receiver.indexOf(attr) ; + if ( attr_pos == -1) { + // If attr IS NOT present in the Vector - add it + receiver.add(attr); receiver.add(value); + } else { + // If attr IS present in the Vector - append value to it + receiver.set(attr_pos+1,receiver.get(attr_pos+1)+value); + } + } }
< prev index next >