Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases/m71 #3

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Changes from 10 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
8c55557
- applied m61 patch to m62
robin-raymond Oct 6, 2017
de13037
Updated vs_toolchain.py file to support VS2017
Oct 26, 2017
8b4c5bf
Set proper include paths for ninja files for x64 platform.
Oct 30, 2017
29c9904
Set proper include paths for ninja files for x86 platform.
Nov 1, 2017
acffe89
Changes to pass WACK and run on Xbox
Nov 7, 2017
9b0c7e4
Replaced usage of system drive with appropriate environment variables
Nov 7, 2017
b8cc22a
Added .gitignore
Jan 30, 2018
9851a7e
Sync chromium/build with changes to be upstreamed to google
robin-raymond Feb 13, 2018
64a61fb
- fixed incorrect comment regarding toolchain setup
robin-raymond Feb 15, 2018
179bc02
Sync with chromium code which reformated some of the upload to google…
robin-raymond Feb 16, 2018
6bbd16d
fix for broken prepare for x86 on linux.
vmancic Feb 20, 2018
8564530
Merge remote-tracking branch 'origin/Robin/m62-chromium-build' into r…
vmancic Mar 10, 2018
a1534f6
Fix for prepare issue on linux x86.
vmancic Mar 14, 2018
bb7e263
Created winuwp_arm64 toolchain
Mar 28, 2018
da87ccc
applied accepted chromium build changes to uwp build
robin-raymond Mar 28, 2018
8057d7a
applied accepted chromium build changes to uwp build
robin-raymond Mar 28, 2018
9603dd0
Added Microsoft ARM assembler for asm tool
Apr 4, 2018
698ec30
Updated input parameters for armasm compiler
Apr 11, 2018
dedb4ef
ATTENTION!!! host_toolchain is set to win:$host_cpu instead of win:$t…
Apr 18, 2018
feea555
fix for undefined identifier cflags_cc.
vmancic Apr 18, 2018
751c5ad
Fix for "Unresolved dependencies" during preparation phase of WebRTC …
vmancic Apr 24, 2018
e8c23ed
merged latest changes from google push to fixes branch
robin-raymond Apr 25, 2018
1fc19f3
Added armasm64 compiler for windows arm64 platform
Apr 26, 2018
45c72c4
merged latest changes from google push to fixes branch
robin-raymond Apr 30, 2018
dfa8786
Merge remote-tracking branch 'origin/Vladimir/test-second-m62-chromiu…
vmancic May 1, 2018
5b0d5bd
Merge commit 'dfa87867bab17cbac1e23af42831632147f89c15' into releases…
robin-raymond May 2, 2018
be194b2
Resolved winuwp arm build issues when used clang-cl. Pay attention on…
May 16, 2018
fae04de
Merge remote-tracking branch 'origin/releases/m62' into Sergej/201803…
May 17, 2018
2e8dba4
- reapply change to remove defines += [ "_USING_V110_SDK71_" ] for w…
robin-raymond Jun 23, 2018
c52de61
cannot build unless default libs are dynamicly link
robin-raymond Jun 23, 2018
d5a2139
compiling with C++17 enabled for WINUWP
robin-raymond Jun 24, 2018
542b170
- reapply change to remove defines += [ "_USING_V110_SDK71_" ] for w…
robin-raymond Jun 23, 2018
497094e
cannot build unless default libs are dynamicly link
robin-raymond Jun 23, 2018
914501a
compiling with C++17 enabled for WINUWP
robin-raymond Jun 24, 2018
c835c66
Merge remote-tracking branch 'origin/Robin/m62-msidl' into Robin/m66-…
robin-raymond Jun 25, 2018
813c5e3
SDK must use 17134
robin-raymond Jun 25, 2018
d357f52
Fix for AssertionError in ARM prepare phase
vmancic Jul 5, 2018
3579185
Fix for "Unexpected target_cpu value: arm"
vmancic Jul 6, 2018
b5211f9
Merge remote-tracking branch 'origin/Robin/m62-arm' into Vladimir/m66…
vmancic Jul 12, 2018
794296b
Merge remote-tracking branch 'origin/Vladimir/m66-arm' into Vladimir/…
vmancic Aug 2, 2018
4557dc7
Merge commit 'dfca77bb0d1aee2eb7ab15d1550d5c4821b48811' into releases…
robin-raymond Sep 27, 2018
cba7ef1
missing } in BUILD.GN
robin-raymond Oct 2, 2018
f0ce0a7
removed code for goma check that is no longer needed
robin-raymond Oct 2, 2018
9941608
support for arm build with win targets
robin-raymond Oct 2, 2018
170c225
removed ZW compilation option
robin-raymond Oct 2, 2018
0946a25
fixed uwp clang default toolchain
robin-raymond Oct 4, 2018
f80b444
cflag_cc - added /ZW when built for winuwp with ms compiler
Oct 11, 2018
8ba9407
Removed /ZW because winrt code is not supported anymore
Oct 11, 2018
b32cf47
Updated cc and ccx tools to support arm64.
Dec 27, 2018
9407778
Merge pull request #2 from webrtc-uwp/Sergej/20181206-m71-python
Jan 10, 2019
ffa7641
Fixed potential linker issue when for building is used Microsoft's cl…
Jan 18, 2019
a6ce039
Made changes based on comments for PRs:
Jan 22, 2019
4e120bb
Merge pull request #5 from webrtc-uwp/Sergej/20181206-m71-python
Jan 22, 2019
4ea2218
Update arm assembly build action in win build toolchain
Feb 19, 2019
0139ca4
Updated asm tool to support clang-cl and armasm.
Mar 22, 2019
916dd19
Merge pull request #6 from webrtc-uwp/Sergej/20190212-m71-arm
Mar 22, 2019
8d91370
added cpp17 flags to build engine
robin-raymond Mar 23, 2019
f0e0893
Merge remote-tracking branch 'origin/releases/m71' into Robin/m71-dot…
Mar 24, 2019
ce61deb
Merge pull request #7 from webrtc-uwp/Robin/m71-dot-net
Apr 15, 2019
5c4a1bc
Enable forcing `/std:c++17` via GN argument
djee-ms Jun 14, 2019
495bba6
Merge pull request #8 from djee-ms/stdcpp17
robin-raymond Jun 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
@@ -259,9 +259,12 @@ if (target_os == "android") {
} else if (target_os == "winuwp") {
# Only target WinUWP on for a Windows store application and only
# x86, x64 and arm are supported target CPUs.
assert(target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" ||
target_cpu == "arm64")
_default_toolchain = "//build/toolchain/win:uwp_$target_cpu"
assert(target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")
if (is_clang) {
_default_toolchain = "//build/toolchain/win:win_clang_$target_cpu"
} else {
_default_toolchain = "//build/toolchain/win:uwp_$target_cpu"
}
} else if (target_os == "aix") {
_default_toolchain = "//build/toolchain/aix:$target_cpu"
} else {
10 changes: 7 additions & 3 deletions config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1020,7 +1020,7 @@ config("clang_revision") {
}

config("compiler_arm_fpu") {
if (current_cpu == "arm" && !is_ios && !is_nacl) {
if ((current_cpu == "arm" || current_cpu == "arm64") && !is_ios && !is_nacl && !is_win) {
cflags = [ "-mfpu=$arm_fpu" ]
asmflags = cflags
}
@@ -1556,7 +1556,7 @@ config("wexit_time_destructors") {
#
# TODO(jschuh): crbug.com/167187 fix this and delete this config.
config("no_size_t_to_int_warning") {
if (is_win && current_cpu == "x64") {
if (is_win && (current_cpu == "x64" || current_cpu == "arm" || current_cpu == "arm64")) {
cflags = [ "/wd4267" ]
}
}
@@ -1960,7 +1960,11 @@ config("symbols") {
# Note that with VC++ this requires is_win_fastlink, enforced elsewhere.
cflags = [ "/Z7" ] # Debug information in the .obj files.
} else {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
if (is_clang) {
cflags = [ "" ]
} else {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
}
}

if (is_win_fastlink) {
19 changes: 16 additions & 3 deletions config/win/BUILD.gn
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ config("compiler") {
if (is_clang) {
cflags += [ "-fmsc-version=1911" ]

if (current_cpu == "x86") {
if (current_cpu == "x86" || current_cpu == "arm") {
cflags += [ "-m32" ]
} else {
cflags += [ "-m64" ]
@@ -313,8 +313,7 @@ config("winver") {

# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
config("sdk_link") {
assert(current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" ||
current_cpu == "arm64",
assert(current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64",
"Only supports x64, x86, arm and arm64 CPUs")
if (current_cpu == "x64") {
ldflags = [ "/MACHINE:X64" ]
@@ -370,6 +369,20 @@ config("common_linker_setup") {
"/DYNAMICBASE",
]

# ASLR makes debugging with windbg difficult because Chrome.exe and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you find this information about chrome? just wondering where it came from

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is Google comment and it was present in older version of that file. I believe that is from m62.

# Chrome.dll share the same base name. As result, windbg will name the
# Chrome.dll module like chrome_<base address>, where <base address>
# typically changes with each launch. This in turn means that breakpoints in
# Chrome.dll don't stick from one launch to the next. For this reason, we
# turn ASLR off in debug builds.
if (is_debug) {
if (current_cpu != "arm" && current_cpu != "arm64") {
ldflags += [ "/DYNAMICBASE:NO" ]
}
} else {
ldflags += [ "/DYNAMICBASE" ]
}

if (win_linker_timing) {
ldflags += [
"/time",
6 changes: 3 additions & 3 deletions secondary/third_party/libjpeg_turbo/BUILD.gn
Original file line number Diff line number Diff line change
@@ -119,13 +119,13 @@ static_library("simd") {
sources = [
"simd/jsimd_x86_64.c",
]
} else if (current_cpu == "arm" && arm_version >= 7 &&
(arm_use_neon || arm_optionally_use_neon)) {
} else if ((target_os != "winuwp") && (current_cpu == "arm" && arm_version >= 7 &&
(arm_use_neon || arm_optionally_use_neon))) {
sources = [
"simd/jsimd_arm.c",
"simd/jsimd_arm_neon.S",
]
} else if (current_cpu == "arm64") {
} else if ((target_os != "winuwp") && (current_cpu == "arm64")) {
sources = [
"simd/jsimd_arm64.c",
"simd/jsimd_arm64_neon.S",
77 changes: 71 additions & 6 deletions toolchain/win/BUILD.gn
Original file line number Diff line number Diff line change
@@ -172,24 +172,37 @@ template("msvc_toolchain") {
outputs = [
"$object_subdir/{{source_name_part}}.obj",
]

command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
if (target_name == "uwp_clang_arm" || target_name == "win_clang_arm") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make it an rspFile for all paths.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, not sure why one path has rspFile and others do not. Original does not have rspPath.

command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\" --target=armv7-windows-msvc /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE"
} else {
rspfile = "{{output}}.rsp"
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
rspfile_content = "$sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}"
}
}

tool("cxx") {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bogus space added.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

precompiled_header_type = "msvc"

# The PDB name needs to be different between C and C++ compiled files.
pdbname = "{{target_out_dir}}/{{label_name}}_cc.pdb"

# See comment in CC tool about quoting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bogus space added.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

depsformat = "msvc"
description = "CXX {{output}}"
outputs = [
"$object_subdir/{{source_name_part}}.obj",
]

command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""

if (target_name == "uwp_clang_arm" || target_name == "win_clang_arm") {
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\" --target=armv7-windows-msvc /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE"
} else {
rspfile = "{{output}}.rsp"
command = "$env_wrapper$cl /nologo /showIncludes ${clflags} @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
rspfile_content = "$sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rsp consistency ?

}
}

tool("rc") {
@@ -204,10 +217,19 @@ template("msvc_toolchain") {
tool("asm") {
if (toolchain_args.current_cpu == "x64") {
ml = "ml64.exe"
} else {
} else if (toolchain_args.current_cpu == "x86") {
ml = "ml.exe"
}
command = "$python_path $tool_wrapper_path asm-wrapper $env $ml {{defines}} {{include_dirs}} {{asmflags}} /c /Fo{{output}} {{source}}"
else if (toolchain_args.current_cpu == "arm"){
ml = "armasm.exe"
} else {
ml = "armasm64.exe"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it needs to be an explicit check for arm64 in case another CPU is ever added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe assert "Unsupported CPU tartget"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

}
if (toolchain_args.current_cpu == "x64" || toolchain_args.current_cpu == "x86") {
command = "$python_path $tool_wrapper_path asm-wrapper $env $ml {{defines}} {{include_dirs}} {{asmflags}} /c /Fo{{output}} {{source}}"
} else {
command = "$python_path $tool_wrapper_path asm-wrapper $env $ml -oldit -16 {{include_dirs}} {{source}} -o {{output}}"
}
description = "ASM {{output}}"
outputs = [
"$object_subdir/{{source_name_part}}.obj",
@@ -464,6 +486,36 @@ win_x64_toolchains("nacl_win64") {
}


# arm clang-cl toolchains. Only define these when the target architecture is arm
# since we don't do any arm cross compiles when targeting 64-bit (the
# build does generate some 64-bit stuff from 32-bit/arm target builds).
if (target_cpu == "arm") {
arm_toolchain_data = exec_script("setup_toolchain.py",
[
visual_studio_path,
windows_sdk_path,
visual_studio_runtime_dirs,
"win",
"arm",
"environment.arm",
goma_disabled,
],
"scope")

msvc_toolchain("win_clang_arm") {
environment = "environment.arm"
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
cl = "${goma_prefix}$prefix/${clang_cl}"
sys_include_flags = "${arm_toolchain_data.include_flags_imsvc}"

toolchain_args = {
current_cpu = "arm"
is_clang = true
current_os = "win"
}
}
}

# WinUWP toolchains. Only define these when targeting them.

if (target_os == "winuwp") {
@@ -490,4 +542,17 @@ if (target_os == "winuwp") {
is_clang = false
}
}

msvc_toolchain("uwp_clang_" + target_cpu) {
environment = "environment.store_" + target_cpu
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
cl = "${goma_prefix}$prefix/${clang_cl}"
sys_include_flags = "${store_cpu_toolchain_data.include_flags_imsvc}"

toolchain_args = {
current_os = "winuwp"
current_cpu = target_cpu
is_clang = true
}
}
}
12 changes: 7 additions & 5 deletions toolchain/win/setup_toolchain.py
Original file line number Diff line number Diff line change
@@ -218,10 +218,11 @@ def main():
vc_lib_path = os.path.realpath(path)
break

for path in env['LIB'].split(';'):
if os.path.exists(os.path.join(path, 'atls.lib')):
vc_lib_atlmfc_path = os.path.realpath(path)
break
if (cpu != 'arm' and cpu != 'arm64'):
for path in env['LIB'].split(';'):
if os.path.exists(os.path.join(path, 'atls.lib')):
vc_lib_atlmfc_path = os.path.realpath(path)
break

for path in env['LIB'].split(';'):
if os.path.exists(os.path.join(path, 'User32.Lib')):
@@ -249,7 +250,8 @@ def main():
print 'vc_lib_path = ' + gn_helpers.ToGNString(vc_lib_path)
if (target_store != True):
# Path is assumed not to exist for desktop applications
assert vc_lib_atlmfc_path
if (cpu != 'arm' and cpu != 'arm64'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this is ok for other non uwp builds.

assert vc_lib_atlmfc_path
# Possible atlmfc library path gets introduced in the future for store thus
# output result if a result exists.
if (vc_lib_atlmfc_path != ''):
9 changes: 7 additions & 2 deletions vs_toolchain.py
Original file line number Diff line number Diff line change
@@ -205,8 +205,12 @@ def _CopyUCRTRuntime(target_dir, source_dir, target_cpu, dll_pattern, suffix):
win_sdk_dir = os.path.normpath(
os.environ.get('WINDOWSSDKDIR',
'C:\\Program Files (x86)\\Windows Kits\\10'))
ucrt_dll_dirs = os.path.join(win_sdk_dir, 'Redist', 'ucrt', 'DLLs',
# SJ - CHECK: for arm64 target_cpu it will be copied 'api-ms-win-*.dll'files from arm folder
if target_cpu != 'arm64':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make this an explicit == 'arm64' then default to standard behaviour.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

ucrt_dll_dirs = os.path.join(win_sdk_dir, 'Redist', 'ucrt', 'DLLs',
target_cpu)
else:
ucrt_dll_dirs = os.path.join(win_sdk_dir, 'Redist', 'ucrt', 'DLLs', 'arm')
ucrt_files = glob.glob(os.path.join(ucrt_dll_dirs, 'api-ms-win-*.dll'))
assert len(ucrt_files) > 0
for ucrt_src_file in ucrt_files:
@@ -304,7 +308,8 @@ def CopyDlls(target_dir, configuration, target_cpu):
if configuration == 'Debug':
_CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True)
else:
_CopyPGORuntime(target_dir, target_cpu)
if not (target_cpu in ('arm', 'arm64')):
_CopyPGORuntime(target_dir, target_cpu)

_CopyDebugger(target_dir, target_cpu)