Created
January 21, 2021 20:49
-
-
Save liyuqian/543461de75d20a49751df87e783fb247 to your computer and use it in GitHub Desktop.
Flutter engine build diff for deploying ML release model https://github.com/google/ml-compiler-opt/blob/main/docs/demo/demo.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn | |
index 4998a7343..31e4e9220 100644 | |
--- a/build/config/compiler/BUILD.gn | |
+++ b/build/config/compiler/BUILD.gn | |
@@ -904,6 +904,7 @@ config("optimize") { | |
} | |
ldflags = common_optimize_on_ldflags + lto_flags | |
cflags += lto_flags | |
+ # cflags += ["-mllvm", "-enable-ml-inliner=release"] | |
} | |
# Turn off optimizations. | |
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn | |
index 3bc51d3ab..318efa144 100644 | |
--- a/build/toolchain/android/BUILD.gn | |
+++ b/build/toolchain/android/BUILD.gn | |
@@ -56,7 +56,7 @@ template("android_gcc_toolchain") { | |
assert(false, "Unknown host") | |
} | |
- prefix = rebase_path("//buildtools/$host_dir/clang/bin", root_build_dir) | |
+ prefix = "/usr/local/google/home/liyuqian/ml/llvm-install-release/bin" # rebase_path("//clang-tf-arm64/bin", root_build_dir) | |
cc = compiler_prefix + prefix + "/clang" | |
cxx = compiler_prefix + prefix + "/clang++" | |
diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn | |
index b345f54f3..a604e5963 100644 | |
--- a/build/toolchain/linux/BUILD.gn | |
+++ b/build/toolchain/linux/BUILD.gn | |
@@ -36,7 +36,7 @@ gcc_toolchain("clang_x86") { | |
prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", | |
root_build_dir) | |
} else { | |
- prefix = rebase_path("//buildtools/linux-x64/clang/bin", root_build_dir) | |
+ prefix = "/usr/local/google/home/liyuqian/ml/llvm-install-release/bin" # prefix = rebase_path("//clang-tf-arm64/bin", root_build_dir) | |
} | |
cc = "${compiler_prefix}$prefix/clang" | |
cxx = "${compiler_prefix}$prefix/clang++" | |
@@ -73,7 +73,7 @@ gcc_toolchain("clang_x64") { | |
prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", | |
root_build_dir) | |
} else { | |
- prefix = rebase_path("//buildtools/linux-x64/clang/bin", root_build_dir) | |
+ prefix = "/usr/local/google/home/liyuqian/ml/llvm-install-release/bin" # rebase_path("//clang-tf-arm64/bin", root_build_dir) | |
} | |
cc = "${compiler_prefix}$prefix/clang" | |
cxx = "${compiler_prefix}$prefix/clang++" | |
@@ -94,7 +94,7 @@ gcc_toolchain("clang_arm64") { | |
prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", | |
root_build_dir) | |
} else { | |
- prefix = rebase_path("//buildtools/linux-x64/clang/bin", root_build_dir) | |
+ prefix = "/usr/local/google/home/liyuqian/ml/llvm-install-release/bin" # rebase_path("//clang-tf-arm64/bin", root_build_dir) | |
} | |
cc = "${compiler_prefix}$prefix/clang" | |
cxx = "${compiler_prefix}$prefix/clang++" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment