From d6dee676acdd1ab0aa4e5ba6834ee7c40a6dd8ab Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 16 Oct 2014 18:36:16 -0700 Subject: dex2oat: Add a --compile-pic option Change-Id: I80e03613e3b6ac079bcbc7e068bbaae760c364c9 --- compiler/driver/compiler_options.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'compiler/driver/compiler_options.h') diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index eb3de975d2..3a50bfdb83 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -28,7 +28,7 @@ class CompilerOptions { kBalanced, // Try to get the best performance return on compilation investment. kSpeed, // Maximize runtime performance. kEverything, // Force compilation (Note: excludes compilation of class initializers). - kTime // Compile methods, but minimize compilation time. + kTime, // Compile methods, but minimize compilation time. }; // Guide heuristics to determine whether to compile method if profile data not available. @@ -59,7 +59,8 @@ class CompilerOptions { include_debug_symbols_(kDefaultIncludeDebugSymbols), implicit_null_checks_(false), implicit_so_checks_(false), - implicit_suspend_checks_(false) + implicit_suspend_checks_(false), + compile_pic_(false) #ifdef ART_SEA_IR_MODE , sea_ir_mode_(false) #endif @@ -77,7 +78,8 @@ class CompilerOptions { bool include_debug_symbols, bool implicit_null_checks, bool implicit_so_checks, - bool implicit_suspend_checks + bool implicit_suspend_checks, + bool compile_pic #ifdef ART_SEA_IR_MODE , bool sea_ir_mode #endif @@ -94,7 +96,8 @@ class CompilerOptions { include_debug_symbols_(include_debug_symbols), implicit_null_checks_(implicit_null_checks), implicit_so_checks_(implicit_so_checks), - implicit_suspend_checks_(implicit_suspend_checks) + implicit_suspend_checks_(implicit_suspend_checks), + compile_pic_(compile_pic) #ifdef ART_SEA_IR_MODE , sea_ir_mode_(sea_ir_mode) #endif @@ -197,6 +200,11 @@ class CompilerOptions { return include_patch_information_; } + // Should the code be compiled as position independent? + bool GetCompilePic() const { + return compile_pic_; + } + private: CompilerFilter compiler_filter_; size_t huge_method_threshold_; @@ -212,6 +220,7 @@ class CompilerOptions { bool implicit_null_checks_; bool implicit_so_checks_; bool implicit_suspend_checks_; + bool compile_pic_; #ifdef ART_SEA_IR_MODE bool sea_ir_mode_; #endif -- cgit v1.2.3-59-g8ed1b