Skip to content

Commit

Permalink
Fix top-level build group to not include the compiler and fixup heade…
Browse files Browse the repository at this point in the history
…rs. (flutter#66)

Targets in the engine had to individually depend on each sub-target in Impeller when all they cared about was all the client libs. The compiler is a build time implicit dependency. So that has been removed from the top-level group.

Also fixed all the headers so that TUs within Impeller don't care about where Impeller itself sits in the source tree.
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent e5fc548 commit 24e249a
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 49 deletions.
11 changes: 1 addition & 10 deletions impeller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
# found in the LICENSE file.

config("impeller_public_config") {
include_dirs = [
"..",
".",
]
include_dirs = [ ".." ]
}

is_host = is_mac || is_linux || is_win

group("impeller") {
public_deps = [
"aiks",
Expand All @@ -24,10 +19,6 @@ group("impeller") {
"tessellator",
"typographer",
]

if (is_host) {
public_deps += [ "compiler" ]
}
}

executable("impeller_unittests") {
Expand Down
2 changes: 1 addition & 1 deletion impeller/aiks/image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/aiks/image.h"
#include "impeller/aiks/image.h"

namespace impeller {

Expand Down
4 changes: 2 additions & 2 deletions impeller/aiks/picture_recorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/aiks/picture_recorder.h"
#include "impeller/aiks/picture_recorder.h"

#include "flutter/impeller/aiks/canvas.h"
#include "impeller/aiks/canvas.h"

namespace impeller {

Expand Down
2 changes: 1 addition & 1 deletion impeller/base/validation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/base/validation.h"
#include "impeller/base/validation.h"

#include "flutter/fml/logging.h"

Expand Down
4 changes: 2 additions & 2 deletions impeller/compiler/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/compiler/compiler.h"
#include "impeller/compiler/compiler.h"

#include <filesystem>
#include <memory>
#include <sstream>

#include "flutter/fml/paths.h"
#include "flutter/impeller/compiler/logger.h"
#include "impeller/compiler/logger.h"

namespace impeller {
namespace compiler {
Expand Down
4 changes: 2 additions & 2 deletions impeller/compiler/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
#include "flutter/impeller/compiler/include_dir.h"
#include "flutter/impeller/compiler/reflector.h"
#include "impeller/compiler/include_dir.h"
#include "impeller/compiler/reflector.h"
#include "shaderc/shaderc.hpp"
#include "third_party/spirv_cross/spirv_msl.hpp"
#include "third_party/spirv_cross/spirv_parser.hpp"
Expand Down
2 changes: 1 addition & 1 deletion impeller/compiler/compiler_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/compiler/compiler.h"
#include "flutter/testing/testing.h"
#include "gtest/gtest.h"
#include "impeller/base/validation.h"
#include "impeller/compiler/compiler.h"

namespace impeller {
namespace compiler {
Expand Down
6 changes: 3 additions & 3 deletions impeller/compiler/impellerc_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include "flutter/fml/file.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
#include "flutter/impeller/compiler/compiler.h"
#include "flutter/impeller/compiler/switches.h"
#include "flutter/impeller/compiler/utilities.h"
#include "impeller/compiler/compiler.h"
#include "impeller/compiler/switches.h"
#include "impeller/compiler/utilities.h"
#include "third_party/shaderc/libshaderc/include/shaderc/shaderc.hpp"

namespace impeller {
Expand Down
10 changes: 5 additions & 5 deletions impeller/compiler/reflector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/compiler/reflector.h"
#include "impeller/compiler/reflector.h"

#include <atomic>
#include <optional>
Expand All @@ -11,12 +11,12 @@

#include "flutter/fml/closure.h"
#include "flutter/fml/logging.h"
#include "flutter/impeller/compiler/code_gen_template.h"
#include "flutter/impeller/compiler/utilities.h"
#include "flutter/impeller/geometry/matrix.h"
#include "flutter/impeller/geometry/scalar.h"
#include "impeller/base/strings.h"
#include "impeller/base/validation.h"
#include "impeller/compiler/code_gen_template.h"
#include "impeller/compiler/utilities.h"
#include "impeller/geometry/matrix.h"
#include "impeller/geometry/scalar.h"

namespace impeller {
namespace compiler {
Expand Down
2 changes: 1 addition & 1 deletion impeller/compiler/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/compiler/switches.h"
#include "impeller/compiler/switches.h"

#include <filesystem>
#include <map>
Expand Down
4 changes: 2 additions & 2 deletions impeller/compiler/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "flutter/fml/command_line.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/unique_fd.h"
#include "flutter/impeller/compiler/compiler.h"
#include "flutter/impeller/compiler/include_dir.h"
#include "impeller/compiler/compiler.h"
#include "impeller/compiler/include_dir.h"

namespace impeller {
namespace compiler {
Expand Down
2 changes: 1 addition & 1 deletion impeller/compiler/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/impeller/compiler/utilities.h"
#include "impeller/compiler/utilities.h"

#include <filesystem>
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion impeller/entity/contents/clip_contents.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "flutter/fml/macros.h"
#include "impeller/entity/contents/contents.h"
#include "typographer/glyph_atlas.h"
#include "impeller/typographer/glyph_atlas.h"

namespace impeller {

Expand Down
20 changes: 10 additions & 10 deletions impeller/entity/contents/content_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

#include "flutter/fml/hash_combine.h"
#include "flutter/fml/macros.h"
#include "flutter/impeller/entity/glyph_atlas.frag.h"
#include "flutter/impeller/entity/glyph_atlas.vert.h"
#include "flutter/impeller/entity/gradient_fill.frag.h"
#include "flutter/impeller/entity/gradient_fill.vert.h"
#include "flutter/impeller/entity/solid_fill.frag.h"
#include "flutter/impeller/entity/solid_fill.vert.h"
#include "flutter/impeller/entity/solid_stroke.frag.h"
#include "flutter/impeller/entity/solid_stroke.vert.h"
#include "flutter/impeller/entity/texture_fill.frag.h"
#include "flutter/impeller/entity/texture_fill.vert.h"
#include "impeller/entity/entity.h"
#include "impeller/entity/glyph_atlas.frag.h"
#include "impeller/entity/glyph_atlas.vert.h"
#include "impeller/entity/gradient_fill.frag.h"
#include "impeller/entity/gradient_fill.vert.h"
#include "impeller/entity/solid_fill.frag.h"
#include "impeller/entity/solid_fill.vert.h"
#include "impeller/entity/solid_stroke.frag.h"
#include "impeller/entity/solid_stroke.vert.h"
#include "impeller/entity/texture_fill.frag.h"
#include "impeller/entity/texture_fill.vert.h"
#include "impeller/renderer/formats.h"

namespace impeller {
Expand Down
4 changes: 2 additions & 2 deletions impeller/playground/playground.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <sstream>

#include "flutter/fml/paths.h"
#include "flutter/impeller/entity/entity_shaders.h"
#include "flutter/impeller/fixtures/shader_fixtures.h"
#include "flutter/testing/testing.h"
#include "impeller/base/validation.h"
#include "impeller/entity/entity_shaders.h"
#include "impeller/fixtures/shader_fixtures.h"
#include "impeller/image/compressed_image.h"
#include "impeller/playground/imgui/imgui_impl_impeller.h"
#include "impeller/playground/imgui/imgui_shaders.h"
Expand Down
10 changes: 5 additions & 5 deletions impeller/renderer/renderer_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
// found in the LICENSE file.

#include "flutter/fml/time/time_point.h"
#include "flutter/impeller/fixtures/box_fade.frag.h"
#include "flutter/impeller/fixtures/box_fade.vert.h"
#include "flutter/impeller/fixtures/test_texture.frag.h"
#include "flutter/impeller/fixtures/test_texture.vert.h"
#include "flutter/testing/testing.h"
#include "impeller/fixtures/box_fade.frag.h"
#include "impeller/fixtures/box_fade.vert.h"
#include "impeller/fixtures/test_texture.frag.h"
#include "impeller/fixtures/test_texture.vert.h"
#include "impeller/geometry/path_builder.h"
#include "impeller/image/compressed_image.h"
#include "impeller/image/decompressed_image.h"
Expand All @@ -21,8 +21,8 @@
#include "impeller/renderer/sampler_descriptor.h"
#include "impeller/renderer/sampler_library.h"
#include "impeller/renderer/surface.h"
#include "impeller/tessellator/tessellator.h"
#include "impeller/renderer/vertex_buffer_builder.h"
#include "impeller/tessellator/tessellator.h"

namespace impeller {
namespace testing {
Expand Down

0 comments on commit 24e249a

Please sign in to comment.