Index: runtime/bin/BUILD.gn |
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn |
index ee6119a13de2e48967575ecd44f52ec8428a17fd..c3140f0d76a31fff5b21c9b7677f6a0442628b11 100644 |
--- a/runtime/bin/BUILD.gn |
+++ b/runtime/bin/BUILD.gn |
@@ -821,6 +821,9 @@ shared_library("test_extension") { |
# The only effect of DART_SHARED_LIB is to export the Dart API. |
"DART_SHARED_LIB", |
] |
+ if (is_linux || is_android) { |
+ cflags = [ "-fPIC" ] |
+ } |
if (is_win) { |
libs = [ "dart.lib" ] |
abs_root_out_dir = rebase_path(root_out_dir) |
@@ -841,6 +844,9 @@ shared_library("sample_extension") { |
# The only effect of DART_SHARED_LIB is to export the Dart API. |
"DART_SHARED_LIB", |
] |
+ if (is_linux || is_android) { |
+ cflags = [ "-fPIC" ] |
+ } |
if (is_win) { |
libs = [ "dart.lib" ] |
abs_root_out_dir = rebase_path(root_out_dir) |