Last active
January 21, 2021 20:48
-
-
Save liyuqian/30eafa93618616e11d3833c3eebd28e3 to your computer and use it in GitHub Desktop.
Flutter engine build diff for ML training 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..29a07cbfe 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 += ["-Xclang", "-fembed-bitcode=all"] | |
} | |
# Turn off optimizations. | |
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn | |
index 3bc51d3ab..48b932694 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/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..706369a73 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/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/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/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