| OLD | NEW |
| 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import("gypi_contents.gni") | 5 import("gypi_contents.gni") |
| 6 import("../runtime_args.gni") | 6 import("../runtime_args.gni") |
| 7 | 7 |
| 8 # Generate a resources.cc file for the service isolate without Observatory. | 8 # Generate a resources.cc file for the service isolate without Observatory. |
| 9 action("gen_resources_cc") { | 9 action("gen_resources_cc") { |
| 10 visibility = [ ":*" ] # Only targets in this file can see this. | 10 visibility = [ ":*" ] # Only targets in this file can see this. |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 ] | 814 ] |
| 815 sources = [ | 815 sources = [ |
| 816 "test_extension.c", | 816 "test_extension.c", |
| 817 "test_extension_dllmain_win.cc", | 817 "test_extension_dllmain_win.cc", |
| 818 ] | 818 ] |
| 819 include_dirs = [ ".." ] | 819 include_dirs = [ ".." ] |
| 820 defines = [ | 820 defines = [ |
| 821 # The only effect of DART_SHARED_LIB is to export the Dart API. | 821 # The only effect of DART_SHARED_LIB is to export the Dart API. |
| 822 "DART_SHARED_LIB", | 822 "DART_SHARED_LIB", |
| 823 ] | 823 ] |
| 824 if (is_linux || is_android) { |
| 825 cflags = [ "-fPIC" ] |
| 826 } |
| 824 if (is_win) { | 827 if (is_win) { |
| 825 libs = [ "dart.lib" ] | 828 libs = [ "dart.lib" ] |
| 826 abs_root_out_dir = rebase_path(root_out_dir) | 829 abs_root_out_dir = rebase_path(root_out_dir) |
| 827 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 830 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
| 828 } | 831 } |
| 829 } | 832 } |
| 830 | 833 |
| 831 shared_library("sample_extension") { | 834 shared_library("sample_extension") { |
| 832 deps = [ | 835 deps = [ |
| 833 ":dart", | 836 ":dart", |
| 834 ] | 837 ] |
| 835 sources = [ | 838 sources = [ |
| 836 "../../samples/sample_extension/sample_extension.cc", | 839 "../../samples/sample_extension/sample_extension.cc", |
| 837 "../../samples/sample_extension/sample_extension_dllmain_win.cc", | 840 "../../samples/sample_extension/sample_extension_dllmain_win.cc", |
| 838 ] | 841 ] |
| 839 include_dirs = [ ".." ] | 842 include_dirs = [ ".." ] |
| 840 defines = [ | 843 defines = [ |
| 841 # The only effect of DART_SHARED_LIB is to export the Dart API. | 844 # The only effect of DART_SHARED_LIB is to export the Dart API. |
| 842 "DART_SHARED_LIB", | 845 "DART_SHARED_LIB", |
| 843 ] | 846 ] |
| 847 if (is_linux || is_android) { |
| 848 cflags = [ "-fPIC" ] |
| 849 } |
| 844 if (is_win) { | 850 if (is_win) { |
| 845 libs = [ "dart.lib" ] | 851 libs = [ "dart.lib" ] |
| 846 abs_root_out_dir = rebase_path(root_out_dir) | 852 abs_root_out_dir = rebase_path(root_out_dir) |
| 847 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 853 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
| 848 } | 854 } |
| 849 } | 855 } |
| OLD | NEW |