From fc9525df236052d1abeee7b75068791e4741d78f Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 28 Nov 2022 09:58:52 -0800 Subject: [PATCH 1/3] [impellerc] specualtive fix for include errors --- impeller/compiler/switches.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/impeller/compiler/switches.cc b/impeller/compiler/switches.cc index 348b6eac31336..261ca57ce1130 100644 --- a/impeller/compiler/switches.cc +++ b/impeller/compiler/switches.cc @@ -8,6 +8,7 @@ #include #include #include +#include #include "flutter/fml/file.h" #include "impeller/compiler/types.h" @@ -156,9 +157,14 @@ Switches::Switches(const fml::CommandLine& command_line) // Note that the `include_dir_path` is already utf8 encoded, and so we // mustn't attempt to double-convert it to utf8 lest multi-byte characters // will become mangled. - auto cwd = Utf8FromPath(std::filesystem::current_path()); - auto include_dir_absolute = std::filesystem::absolute( - std::filesystem::path(cwd) / include_dir_path); + std::filesystem::path include_dir_absolute; + if (std::filesystem::path(include_dir_path).is_absolute()) { + include_dir_absolute = std::filesystem::path(include_dir_path); + } else { + auto cwd = Utf8FromPath(std::filesystem::current_path()); + include_dir_absolute = std::filesystem::absolute( + std::filesystem::path(cwd) / include_dir_path); + } auto dir = std::make_shared(fml::OpenDirectoryReadOnly( *working_directory, include_dir_absolute.string().c_str())); From 25bbd345e6a48acbbd0e97cc6f4949003470e09d Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 28 Nov 2022 09:59:04 -0800 Subject: [PATCH 2/3] ++ --- impeller/compiler/switches.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impeller/compiler/switches.cc b/impeller/compiler/switches.cc index 261ca57ce1130..0f45514056a21 100644 --- a/impeller/compiler/switches.cc +++ b/impeller/compiler/switches.cc @@ -7,8 +7,8 @@ #include #include #include -#include #include +#include #include "flutter/fml/file.h" #include "impeller/compiler/types.h" From a3b9744a39007c4387a8cbd1cee5980c43adcb5b Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 28 Nov 2022 09:59:40 -0800 Subject: [PATCH 3/3] ++ --- impeller/compiler/switches.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/impeller/compiler/switches.cc b/impeller/compiler/switches.cc index 0f45514056a21..7618b0ed0ad73 100644 --- a/impeller/compiler/switches.cc +++ b/impeller/compiler/switches.cc @@ -7,7 +7,6 @@ #include #include #include -#include #include #include "flutter/fml/file.h"