pcc updated this revision to Diff 371465. pcc added a comment. Move to data_deps
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109464/new/ https://reviews.llvm.org/D109464 Files: llvm/utils/gn/build/libs/xml/enable.gni llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn Index: llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn +++ llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn @@ -1,3 +1,4 @@ +import("//compiler-rt/target.gni") import("//llvm/utils/TableGen/tablegen.gni") tablegen("LLGSOptions") { @@ -57,4 +58,8 @@ "lldb-platform.cpp", "lldb-server.cpp", ] + + if (current_os == "android") { + output_dir = "$root_build_dir/runtimes_ndk_cxx/$crt_current_target_arch" + } } Index: llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn +++ llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn @@ -1,4 +1,5 @@ import("//llvm/utils/TableGen/tablegen.gni") +import("//llvm/utils/gn/build/toolchain/compiler.gni") import("//llvm/utils/gn/build/write_cmake_config.gni") import("//llvm/version.gni") @@ -15,6 +16,14 @@ } } +supported_toolchains = [] +if (android_ndk_path != "") { + supported_toolchains += [ + "//llvm/utils/gn/build/toolchain:stage2_android_aarch64", + "//llvm/utils/gn/build/toolchain:stage2_android_arm", + ] +} + executable("lldb") { configs += [ "//llvm/utils/gn/build:lldb_code" ] deps = [ @@ -35,6 +44,9 @@ if (current_os == "linux") { data_deps += [ "//lldb/tools/lldb-server" ] } + foreach (toolchain, supported_toolchains) { + data_deps += [ "//lldb/tools/lldb-server($toolchain)" ] + } sources = [ "Driver.cpp", Index: llvm/utils/gn/build/libs/xml/enable.gni =================================================================== --- llvm/utils/gn/build/libs/xml/enable.gni +++ llvm/utils/gn/build/libs/xml/enable.gni @@ -1,4 +1,4 @@ declare_args() { # Whether to include code that links against libxml2. - llvm_enable_libxml2 = host_os != "win" + llvm_enable_libxml2 = current_os != "win" && current_os != "android" }
Index: llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn +++ llvm/utils/gn/secondary/lldb/tools/lldb-server/BUILD.gn @@ -1,3 +1,4 @@ +import("//compiler-rt/target.gni") import("//llvm/utils/TableGen/tablegen.gni") tablegen("LLGSOptions") { @@ -57,4 +58,8 @@ "lldb-platform.cpp", "lldb-server.cpp", ] + + if (current_os == "android") { + output_dir = "$root_build_dir/runtimes_ndk_cxx/$crt_current_target_arch" + } } Index: llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn +++ llvm/utils/gn/secondary/lldb/tools/driver/BUILD.gn @@ -1,4 +1,5 @@ import("//llvm/utils/TableGen/tablegen.gni") +import("//llvm/utils/gn/build/toolchain/compiler.gni") import("//llvm/utils/gn/build/write_cmake_config.gni") import("//llvm/version.gni") @@ -15,6 +16,14 @@ } } +supported_toolchains = [] +if (android_ndk_path != "") { + supported_toolchains += [ + "//llvm/utils/gn/build/toolchain:stage2_android_aarch64", + "//llvm/utils/gn/build/toolchain:stage2_android_arm", + ] +} + executable("lldb") { configs += [ "//llvm/utils/gn/build:lldb_code" ] deps = [ @@ -35,6 +44,9 @@ if (current_os == "linux") { data_deps += [ "//lldb/tools/lldb-server" ] } + foreach (toolchain, supported_toolchains) { + data_deps += [ "//lldb/tools/lldb-server($toolchain)" ] + } sources = [ "Driver.cpp", Index: llvm/utils/gn/build/libs/xml/enable.gni =================================================================== --- llvm/utils/gn/build/libs/xml/enable.gni +++ llvm/utils/gn/build/libs/xml/enable.gni @@ -1,4 +1,4 @@ declare_args() { # Whether to include code that links against libxml2. - llvm_enable_libxml2 = host_os != "win" + llvm_enable_libxml2 = current_os != "win" && current_os != "android" }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits