Allow ni common initialization for arm architecture only. accepted/tizen/5.0/unified/20181113.090018 accepted/tizen/unified/20181113.085941 submit/tizen/20181112.072849 submit/tizen_5.0/20181112.073007
authorWoongsuk Cho <ws77.cho@samsung.com>
Wed, 7 Nov 2018 10:21:13 +0000 (19:21 +0900)
committer이형주/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Sun, 11 Nov 2018 23:05:44 +0000 (08:05 +0900)
AOTed dlls which generated under x86 architecture do not work correctly.
So, skip ni file generation except arm architecture.

NI_COMMON module can be used by other tools (for example vd-nitool)
So, add architecture checking code in the initNICommon() function

NativeLauncher/installer-plugin/ni_common.cc

index 4c5ca44..9ca229e 100644 (file)
@@ -254,6 +254,7 @@ static void createCoreLibNI(bool enableR2R)
 
 int initNICommon(NiCommonOption* option)
 {
+#if defined(__arm__)
        // get interval value
        const char* intervalFile = "/usr/share/dotnet.tizen/lib/crossgen_interval.txt";
        std::ifstream inFile(intervalFile);
@@ -274,6 +275,10 @@ int initNICommon(NiCommonOption* option)
        __tpa = getTPA();
 
        return 0;
+#else
+       fprintf(stderr, "crossgen supports arm architecture only. skip ni file generation\n");
+       return -1;
+#endif
 }
 
 void finalizeNICommon()