Support legacy and vndklite mode
Support legacy and vndklite linker configuration. This program will
generate these configurations based on the property - ro.vndk.version
and ro.vndk.lite
Bug: 139638519
Bug: 139639353
Test: m -j && atest passed
Test: Generated from cuttlefish and compared from original content
Change-Id: I4461a4bd8befce0ffdc6b1a7f644650902320eb5
diff --git a/main.cc b/main.cc
index a7dc090..a721485 100644
--- a/main.cc
+++ b/main.cc
@@ -15,12 +15,15 @@
*/
#include <getopt.h>
+
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include "linkerconfig/baseconfig.h"
+#include "linkerconfig/environment.h"
+#include "linkerconfig/legacy.h"
#include "linkerconfig/log.h"
#include "linkerconfig/variableloader.h"
#include "linkerconfig/variables.h"
@@ -81,9 +84,9 @@
}
android::linkerconfig::modules::Configuration GetConfiguration() {
- // TODO : Use legacy if needed
-
- // TODO : Use vndk lite if needed
+ if (android::linkerconfig::modules::IsLegacyDevice()) {
+ return android::linkerconfig::contents::CreateLegacyConfiguration();
+ }
// TODO : Use recovery if needed