Add clang version to Info.plist (flutter/engine#9873)
This commit is contained in:
@@ -10,22 +10,32 @@ engine.
|
||||
|
||||
Precondition: $CWD/../../flutter is the path to the flutter engine repo.
|
||||
|
||||
usage: copy_info_plist.py <src_path> <dest_path>
|
||||
usage: copy_info_plist.py <src_path> <dest_path> --bitcode=<enable_bitcode>
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
import subprocess
|
||||
|
||||
import sys
|
||||
import git_revision
|
||||
import os
|
||||
|
||||
def GetClangVersion(bitcode) :
|
||||
clang_executable = str(os.path.join("..", "..", "buildtools", "mac-x64", "clang", "bin", "clang++"))
|
||||
if bitcode:
|
||||
clang_executable = "clang++"
|
||||
version = subprocess.check_output([clang_executable, "--version"])
|
||||
return version.splitlines()[0]
|
||||
|
||||
def main():
|
||||
text = open(sys.argv[1]).read()
|
||||
engine_path = os.path.join(os.getcwd(), "..", "..", "flutter")
|
||||
revision = git_revision.GetRepositoryVersion(engine_path)
|
||||
text = text.format(revision)
|
||||
clang_version = GetClangVersion(sys.argv[3] == "--bitcode=true")
|
||||
text = text.format(revision, clang_version)
|
||||
|
||||
with open(sys.argv[2], "w") as outfile:
|
||||
outfile.write(text)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
assert(is_ios)
|
||||
|
||||
import("//build/config/ios/ios_sdk.gni")
|
||||
import("//build/toolchain/clang.gni")
|
||||
import("$flutter_root/common/config.gni")
|
||||
import("$flutter_root/shell/gpu/gpu.gni")
|
||||
import("$flutter_root/shell/platform/darwin/common/framework_shared.gni")
|
||||
@@ -189,6 +190,7 @@ action("copy_framework_info_plist") {
|
||||
args = [
|
||||
rebase_path(sources[0]),
|
||||
rebase_path(outputs[0]),
|
||||
"--bitcode=$enable_bitcode",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -24,5 +24,7 @@
|
||||
<string>8.0</string>
|
||||
<key>FlutterEngine</key>
|
||||
<string>{0}</string>
|
||||
<key>ClangVersion</key>
|
||||
<string>{1}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/toolchain/clang.gni")
|
||||
import("$flutter_root/common/config.gni")
|
||||
import("$flutter_root/shell/gpu/gpu.gni")
|
||||
import("$flutter_root/shell/platform/embedder/embedder.gni")
|
||||
@@ -165,6 +166,7 @@ if (is_mac && !embedder_for_target) {
|
||||
args = [
|
||||
rebase_path(sources[0]),
|
||||
rebase_path(outputs[0]),
|
||||
"--bitcode=$enable_bitcode",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -26,5 +26,7 @@
|
||||
<string>Copyright 2013 The Flutter Authors. All rights reserved.</string>
|
||||
<key>FlutterEngine</key>
|
||||
<string>{0}</string>
|
||||
<key>ClangVersion</key>
|
||||
<string>{1}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user