From fb485f12296cea8f4d049b57031ce55140be5239 Mon Sep 17 00:00:00 2001 From: John Stiles Date: Tue, 5 Apr 2022 15:38:49 -0400 Subject: [PATCH] Move SkSLMain into tools/skslc/Main.cpp. Change-Id: Id8d943b3eb752bad7f45c852c832c1f1fa0bdaca Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527776 Auto-Submit: John Stiles Reviewed-by: Brian Osman Commit-Queue: John Stiles --- BUILD.gn | 2 +- public.bzl | 2 +- src/sksl/BUILD.bazel | 27 ------------------ tools/skslc/BUILD.bazel | 28 +++++++++++++++++++ src/sksl/SkSLMain.cpp => tools/skslc/Main.cpp | 0 5 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 tools/skslc/BUILD.bazel rename src/sksl/SkSLMain.cpp => tools/skslc/Main.cpp (100%) diff --git a/BUILD.gn b/BUILD.gn index 383103f4cf..d9fa8af8b9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -638,7 +638,7 @@ if (skia_compile_sksl_tests) { "SK_ENABLE_SPIRV_VALIDATION", ] sources = skslc_deps - sources += [ "src/sksl/SkSLMain.cpp" ] + sources += [ "tools/skslc/Main.cpp" ] libs = [] if (is_win) { sources += [ "src/ports/SkOSFile_win.cpp" ] diff --git a/public.bzl b/public.bzl index a8ebc91192..6c57b2ddee 100644 --- a/public.bzl +++ b/public.bzl @@ -247,7 +247,7 @@ BASE_SRCS_ALL = struct( "src/gpu/dawn/*", # Defines main. - "src/sksl/SkSLMain.cpp", + "tools/skslc/Main.cpp", # Only used to regenerate the lexer "src/sksl/lex/*", diff --git a/src/sksl/BUILD.bazel b/src/sksl/BUILD.bazel index ba9c0f7b0c..5ce179ec4c 100644 --- a/src/sksl/BUILD.bazel +++ b/src/sksl/BUILD.bazel @@ -574,33 +574,6 @@ generated_cc_atom( deps = [":SkSLLexer_hdr"], ) -generated_cc_atom( - name = "SkSLMain_src", - srcs = ["SkSLMain.cpp"], - visibility = ["//:__subpackages__"], - deps = [ - ":SkSLCompiler_hdr", - ":SkSLDehydrator_hdr", - ":SkSLFileOutputStream_hdr", - ":SkSLStringStream_hdr", - ":SkSLUtil_hdr", - "//include/core:SkGraphics_hdr", - "//include/core:SkStream_hdr", - "//include/private:SkStringView_hdr", - "//src/core:SkCpu_hdr", - "//src/core:SkOpts_hdr", - "//src/opts:SkChecksum_opts_hdr", - "//src/opts:SkVM_opts_hdr", - "//src/sksl/codegen:SkSLPipelineStageCodeGenerator_hdr", - "//src/sksl/codegen:SkSLVMCodeGenerator_hdr", - "//src/sksl/ir:SkSLUnresolvedFunction_hdr", - "//src/sksl/ir:SkSLVarDeclarations_hdr", - "//src/sksl/tracing:SkVMDebugTrace_hdr", - "//src/utils:SkShaderUtils_hdr", - "//src/utils:SkVMVisualizer_hdr", - ], -) - generated_cc_atom( name = "SkSLMangler_hdr", hdrs = ["SkSLMangler.h"], diff --git a/tools/skslc/BUILD.bazel b/tools/skslc/BUILD.bazel new file mode 100644 index 0000000000..23b433368e --- /dev/null +++ b/tools/skslc/BUILD.bazel @@ -0,0 +1,28 @@ +load("//bazel:macros.bzl", "generated_cc_atom") + +generated_cc_atom( + name = "Main_src", + srcs = ["Main.cpp"], + visibility = ["//:__subpackages__"], + deps = [ + "//include/core:SkGraphics_hdr", + "//include/core:SkStream_hdr", + "//include/private:SkStringView_hdr", + "//src/core:SkCpu_hdr", + "//src/core:SkOpts_hdr", + "//src/opts:SkChecksum_opts_hdr", + "//src/opts:SkVM_opts_hdr", + "//src/sksl:SkSLCompiler_hdr", + "//src/sksl:SkSLDehydrator_hdr", + "//src/sksl:SkSLFileOutputStream_hdr", + "//src/sksl:SkSLStringStream_hdr", + "//src/sksl:SkSLUtil_hdr", + "//src/sksl/codegen:SkSLPipelineStageCodeGenerator_hdr", + "//src/sksl/codegen:SkSLVMCodeGenerator_hdr", + "//src/sksl/ir:SkSLUnresolvedFunction_hdr", + "//src/sksl/ir:SkSLVarDeclarations_hdr", + "//src/sksl/tracing:SkVMDebugTrace_hdr", + "//src/utils:SkShaderUtils_hdr", + "//src/utils:SkVMVisualizer_hdr", + ], +) diff --git a/src/sksl/SkSLMain.cpp b/tools/skslc/Main.cpp similarity index 100% rename from src/sksl/SkSLMain.cpp rename to tools/skslc/Main.cpp