NATIVE: simplify toolchain XML
authorgyeongmin.ju <gyeongmin.ju@samsung.com>
Fri, 14 Jul 2017 05:40:04 +0000 (14:40 +0900)
committergyeongmin.ju <gyeongmin.ju@samsung.com>
Mon, 17 Jul 2017 07:16:46 +0000 (16:16 +0900)
Simplify toolchain XML (remove PROJECT_TYPE parameter)

Issue: SPTSDKUX-4329, SPTSDKUX-4264
Signed-off-by: gyeongmin.ju gyeongmin.ju@samsung.com
org.tizen.nativecore/src/org/tizen/nativecore/build/NativeCoreConfigurationEnvVarSupplier.java
org.tizen.nativecore/src/org/tizen/nativecore/build/NativeCoreConfigurationManager.java
org.tizen.nativecore/src/org/tizen/nativecore/build/TizenBuiltinSpecsDetector.java

index 0582329..3ec7e28 100644 (file)
@@ -534,9 +534,8 @@ public class NativeCoreConfigurationEnvVarSupplier implements
             if (targetId == null) {
                 return "";
             }
-            String projectType = NativeCoreConfigurationManager.getProjectType(config);
             PluginManager pm = PluginManager.getInstance();
-            String path = pm.getDefaultGCCToolchainFileName(targetId, projectType);
+            String path = pm.getDefaultGCCToolchainFileName(targetId);
             return path;
         } catch (Exception e) {
             logger.error("Failed to get platform gcc path", e);
@@ -550,9 +549,8 @@ public class NativeCoreConfigurationEnvVarSupplier implements
             if (targetId == null) {
                 return "";
             }
-            String projectType = NativeCoreConfigurationManager.getProjectType(config);
             PluginManager pm = PluginManager.getInstance();
-            String path = pm.getDefaultGCCToolchainPath(targetId, projectType);
+            String path = pm.getDefaultGCCToolchainPath(targetId);
             return path;
         } catch (Exception e) {
             logger.error("Failed to get platform gcc path", e);
index 920b103..d2e0184 100644 (file)
@@ -1281,8 +1281,9 @@ public class NativeCoreConfigurationManager extends CommonConfigurationManager {
         for (Toolchain tc : pm.getToolchainList()) {
             String name = tc.getName().toLowerCase();
             String arch = tc.getArchitecture();
-            String type = tc.getProjectType();
-            if (name.startsWith(namePrefix) && isX86Arch(arch) && type.equals(appType)) {
+            //String type = tc.getProjectType();
+            //if (name.startsWith(namePrefix) && isX86Arch(arch) && type.equals(appType)) {
+            if (name.startsWith(namePrefix) && isX86Arch(arch)) {
                 String version = name.substring(namePrefix.length());
                 if (latestVersion.isEmpty()) {
                     latestVersion = version;
@@ -1308,8 +1309,9 @@ public class NativeCoreConfigurationManager extends CommonConfigurationManager {
         for (Toolchain tc : pm.getToolchainList()) {
             String name = tc.getName().toLowerCase();
             String arch = tc.getArchitecture();
-            String type = tc.getProjectType();
-            if (name.startsWith(namePrefix) && isArmArch(arch) && type.equals(appType)) {
+            //String type = tc.getProjectType();
+            //if (name.startsWith(namePrefix) && isArmArch(arch) && type.equals(appType)) {
+            if (name.startsWith(namePrefix) && isArmArch(arch)) {
                 String version = name.substring(namePrefix.length());
                 if (latestVersion.isEmpty()) {
                     latestVersion = version;
index 9a9d303..e4be4b1 100644 (file)
@@ -248,9 +248,9 @@ public class TizenBuiltinSpecsDetector extends ToolchainBuiltinSpecsDetector imp
 
             // resolve "PLATFORM_DEFAULT_GCC_PATH" inner (SBI) macro
             Map<String, String> macros = new HashMap<String, String>();
-            String defaultGccPath = pluginMgr.getDefaultGCCToolchainPath(targetId, tc.getProjectType());
+            String defaultGccPath = pluginMgr.getDefaultGCCToolchainPath(targetId);
             macros.put(NativeCoreConfigurationManager.MACRO_PLATFORM_DEFAULT_GCC_PATH, defaultGccPath);
-            String defaultGccFileName = pluginMgr.getDefaultGCCToolchainFileName(targetId, tc.getProjectType());
+            String defaultGccFileName = pluginMgr.getDefaultGCCToolchainFileName(targetId);
             if(defaultGccFileName != null && !defaultGccFileName.isEmpty()){
                 String defaultGccName = new File(defaultGccFileName).getName();
                 if(OSChecker.isWindows() && defaultGccName.endsWith(".exe")) {