summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCho Woong Suk <ws77.cho@samsung.com>2018-02-22 16:45:11 +0900
committerCho Woong Suk <ws77.cho@samsung.com>2018-02-22 16:45:11 +0900
commitdb615b8826eed0fad8ecccd687b0b77d620c8ebf (patch)
treeee6ea88d27ff24112e048807df49a7b9a1785e4b
parent0885bb0c16c7fac896c566e4cf2f662b048eb41f (diff)
downloadlauncher-db615b8826eed0fad8ecccd687b0b77d620c8ebf.tar.gz
launcher-db615b8826eed0fad8ecccd687b0b77d620c8ebf.tar.bz2
launcher-db615b8826eed0fad8ecccd687b0b77d620c8ebf.zip
multi-architecture supportsubmit/tizen_4.0/20180222.081235
Change-Id: Id7e7fc24b6fa35ca547e441a297d5d6325fef41b
-rw-r--r--NativeLauncher/launcher/dotnet/dotnet_launcher.cc27
1 files changed, 23 insertions, 4 deletions
diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc
index f7d04db..28987bb 100644
--- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc
+++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc
@@ -40,20 +40,39 @@ namespace dotnetcore {
#if defined (__aarch64__)
#define ARCHITECTURE_IDENTIFIER "arm64"
+const static std::vector<std::string> RID_FALLBACK_GRAPH =
+ {"linux-arm64", "linux", "unix-arm64", "unix", "any", "base"};
+
#elif defined (__arm__)
#define ARCHITECTURE_IDENTIFIER "arm"
+const static std::vector<std::string> RID_FALLBACK_GRAPH =
+ {"tizen.4.0.0-armel", "tizen.4.0.0", "tizen-armel", "tizen", "linux-armel", "linux", "unix-armel", "unix", "any", "base"};
+
#elif defined (__x86_64__)
#define ARCHITECTURE_IDENTIFIER "x64"
+const static std::vector<std::string> RID_FALLBACK_GRAPH =
+ {"linux-x64", "linux", "unix-x64", "unix", "any", "base"};
+
#elif defined (__i386__)
#define ARCHITECTURE_IDENTIFIER "x86"
+const static std::vector<std::string> RID_FALLBACK_GRAPH =
+ {"linux-x86", "linux", "unix-x86", "unix", "any", "base"};
+
#else
-#define ARCHITECTURE_IDENTIFIER "unknown"
+#error "Unknown target"
#endif
static std::string getExtraNativeLibDirs(const std::string& appRoot)
{
- // auto generated directory by nuget will be considered later
- std::string candidate = concatPath(appRoot, "lib/" ARCHITECTURE_IDENTIFIER);
+ std::string candidate;
+ for (int i = 0; i < RID_FALLBACK_GRAPH.size(); i++) {
+ if(!candidate.empty()) {
+ candidate += ":";
+ }
+ candidate += concatPath(appRoot, "bin/runtimes/" + RID_FALLBACK_GRAPH[i] + "/native");
+ }
+
+ candidate = candidate + ":" + concatPath(appRoot, "lib/" ARCHITECTURE_IDENTIFIER);
if (!strncmp(ARCHITECTURE_IDENTIFIER, "arm64", 5)) {
candidate = candidate + ":" + concatPath(appRoot, "lib/aarch64");
}
@@ -215,7 +234,7 @@ int CoreRuntime::initialize(bool standalone)
assembliesInDirectory(searchDirectories, tpa);
std::string nativeLibPath;
- nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appLib + ":" + appBin + ":" + __nativeLibDirectory;
+ nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib + ":" + __nativeLibDirectory;
std::string appName = std::string("dotnet-launcher-") + std::to_string(getpid());
if (!initializeCoreClr(appName.c_str(), probePath.c_str(), nativeLibPath.c_str(), tpa.c_str())) {