Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
66bb7dcc
提交
66bb7dcc
authored
6月 01, 2020
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update gyp
上级
ee3d3be4
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
67 行增加
和
26 行删除
+67
-26
xcode_emulation.py
worker/deps/gyp/pylib/gyp/xcode_emulation.py
+16
-17
gyptest-objc-arc.py
worker/deps/gyp/test/mac/gyptest-objc-arc.py
+1
-0
c-file.c
worker/deps/gyp/test/mac/objc-arc/c-file.c
+1
-2
cc-file.cc
worker/deps/gyp/test/mac/objc-arc/cc-file.cc
+1
-1
m-file-arc-weak.m
worker/deps/gyp/test/mac/objc-arc/m-file-arc-weak.m
+9
-0
m-file-no-arc.m
worker/deps/gyp/test/mac/objc-arc/m-file-no-arc.m
+4
-0
m-file.m
worker/deps/gyp/test/mac/objc-arc/m-file.m
+4
-0
mm-file-arc-weak.mm
worker/deps/gyp/test/mac/objc-arc/mm-file-arc-weak.mm
+9
-0
mm-file-no-arc.mm
worker/deps/gyp/test/mac/objc-arc/mm-file-no-arc.mm
+4
-0
mm-file.mm
worker/deps/gyp/test/mac/objc-arc/mm-file.mm
+4
-0
test.gyp
worker/deps/gyp/test/mac/objc-arc/test.gyp
+14
-6
没有找到文件。
worker/deps/gyp/pylib/gyp/xcode_emulation.py
浏览文件 @
66bb7dcc
...
@@ -726,6 +726,8 @@ class XcodeSettings(object):
...
@@ -726,6 +726,8 @@ class XcodeSettings(object):
def
_AddObjectiveCARCFlags
(
self
,
flags
):
def
_AddObjectiveCARCFlags
(
self
,
flags
):
if
self
.
_Test
(
'CLANG_ENABLE_OBJC_ARC'
,
'YES'
,
default
=
'NO'
):
if
self
.
_Test
(
'CLANG_ENABLE_OBJC_ARC'
,
'YES'
,
default
=
'NO'
):
flags
.
append
(
'-fobjc-arc'
)
flags
.
append
(
'-fobjc-arc'
)
if
self
.
_Test
(
'CLANG_ENABLE_OBJC_WEAK'
,
'YES'
,
default
=
'NO'
):
flags
.
append
(
'-fobjc-weak'
)
def
_AddObjectiveCMissingPropertySynthesisFlags
(
self
,
flags
):
def
_AddObjectiveCMissingPropertySynthesisFlags
(
self
,
flags
):
if
self
.
_Test
(
'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS'
,
if
self
.
_Test
(
'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS'
,
...
@@ -1394,8 +1396,6 @@ def XcodeVersion():
...
@@ -1394,8 +1396,6 @@ def XcodeVersion():
global
XCODE_VERSION_CACHE
global
XCODE_VERSION_CACHE
if
XCODE_VERSION_CACHE
:
if
XCODE_VERSION_CACHE
:
return
XCODE_VERSION_CACHE
return
XCODE_VERSION_CACHE
version
=
""
build
=
""
try
:
try
:
version_list
=
GetStdout
([
'xcodebuild'
,
'-version'
])
.
splitlines
()
version_list
=
GetStdout
([
'xcodebuild'
,
'-version'
])
.
splitlines
()
# In some circumstances xcodebuild exits 0 but doesn't return
# In some circumstances xcodebuild exits 0 but doesn't return
...
@@ -1405,16 +1405,21 @@ def XcodeVersion():
...
@@ -1405,16 +1405,21 @@ def XcodeVersion():
# checking that version.
# checking that version.
if
len
(
version_list
)
<
2
:
if
len
(
version_list
)
<
2
:
raise
GypError
(
"xcodebuild returned unexpected results"
)
raise
GypError
(
"xcodebuild returned unexpected results"
)
version
=
version_list
[
0
]
.
split
()[
-
1
]
# Last word on first line
except
:
build
=
version_list
[
-
1
]
.
split
()[
-
1
]
# Last word on last line
version
=
CLTVersion
()
except
GypError
:
# Xcode not installed so look for XCode Command Line Tools
if
version
:
version
=
CLTVersion
()
# macOS Catalina returns 11.0.0.0.xxx or 11.5
version
=
re
.
match
(
r'(\d\.\d\.?\d*)'
,
version
)
.
groups
()[
0
]
if
not
version
:
else
:
raise
GypError
(
"No Xcode or CLT version detected!"
)
raise
GypError
(
"No Xcode or CLT version detected!"
)
# Be careful to convert "4.2" to "0420" and "11.0.0" to "1100":
# The CLT has no build information, so we return an empty string.
version
=
version
.
split
(
"."
)[:
3
]
# Just major, minor, micro
version_list
=
[
version
,
''
]
version
[
0
]
=
version
[
0
]
.
zfill
(
2
)
# Add a leading zero if major is one digit
version
=
version_list
[
0
]
version
=
(
""
.
join
(
version
)
+
"00"
)[:
4
]
# Limit to exactly four characters
build
=
version_list
[
-
1
]
# Be careful to convert "4.2" to "0420":
version
=
version
.
split
()[
-
1
]
.
replace
(
'.'
,
''
)
version
=
(
version
+
'0'
*
(
3
-
len
(
version
)))
.
zfill
(
4
)
if
build
:
build
=
build
.
split
()[
-
1
]
XCODE_VERSION_CACHE
=
(
version
,
build
)
XCODE_VERSION_CACHE
=
(
version
,
build
)
return
XCODE_VERSION_CACHE
return
XCODE_VERSION_CACHE
...
@@ -1441,12 +1446,6 @@ def CLTVersion():
...
@@ -1441,12 +1446,6 @@ def CLTVersion():
except
:
except
:
continue
continue
regex
=
re
.
compile
(
'Command Line Tools for Xcode
\
s+(?P<version>
\
S+)'
)
try
:
output
=
GetStdout
([
'/usr/sbin/softwareupdate'
,
'--history'
])
return
re
.
search
(
regex
,
output
)
.
groupdict
()[
'version'
]
except
(
GypError
,
OSError
):
return
None
def
GetStdout
(
cmdlist
):
def
GetStdout
(
cmdlist
):
"""Returns the content of standard output returned by invoking |cmdlist|.
"""Returns the content of standard output returned by invoking |cmdlist|.
...
...
worker/deps/gyp/test/mac/gyptest-objc-arc.py
浏览文件 @
66bb7dcc
...
@@ -21,6 +21,7 @@ if sys.platform == 'darwin':
...
@@ -21,6 +21,7 @@ if sys.platform == 'darwin':
test
.
run_gyp
(
'test.gyp'
,
chdir
=
CHDIR
)
test
.
run_gyp
(
'test.gyp'
,
chdir
=
CHDIR
)
test
.
build
(
'test.gyp'
,
'arc_enabled'
,
chdir
=
CHDIR
)
test
.
build
(
'test.gyp'
,
'arc_enabled'
,
chdir
=
CHDIR
)
test
.
build
(
'test.gyp'
,
'weak_enabled'
,
chdir
=
CHDIR
)
test
.
build
(
'test.gyp'
,
'arc_disabled'
,
chdir
=
CHDIR
)
test
.
build
(
'test.gyp'
,
'arc_disabled'
,
chdir
=
CHDIR
)
test
.
pass_test
()
test
.
pass_test
()
worker/deps/gyp/test/mac/objc-arc/c-file.c
浏览文件 @
66bb7dcc
#if __has_feature(objc_arc)
#if __has_feature(objc_arc)
|| __has_feature(objc_arc_weak)
#error "C files shouldn't be ARC'd!"
#error "C files shouldn't be ARC'd!"
#endif
#endif
void
c_fun
()
{}
void
c_fun
()
{}
worker/deps/gyp/test/mac/objc-arc/cc-file.cc
浏览文件 @
66bb7dcc
#if __has_feature(objc_arc)
#if __has_feature(objc_arc)
|| __has_feature(objc_arc_weak)
#error "C++ files shouldn't be ARC'd!"
#error "C++ files shouldn't be ARC'd!"
#endif
#endif
...
...
worker/deps/gyp/test/mac/objc-arc/m-file-arc-weak.m
0 → 100644
浏览文件 @
66bb7dcc
#
if
__
has_feature
(
objc_arc
)
#
error
"
ObjC
files
without
CLANG_ENABLE_OBJC_ARC
should
not
be
ARC
'
d
!"
#
endif
#
if
!__
has_feature
(
objc_arc_weak
)
#
error
"
With
CLANG_ENABLE_OBJC_WEAK
,
weak
references
should
be
enabled
.
"
#
endif
void
m_fun
()
{}
worker/deps/gyp/test/mac/objc-arc/m-file-no-arc.m
浏览文件 @
66bb7dcc
...
@@ -2,4 +2,8 @@
...
@@ -2,4 +2,8 @@
#
error
"
ObjC
files
without
CLANG_ENABLE_OBJC_ARC
should
not
be
ARC
'
d
!"
#
error
"
ObjC
files
without
CLANG_ENABLE_OBJC_ARC
should
not
be
ARC
'
d
!"
#
endif
#
endif
#
if
__
has_feature
(
objc_arc_weak
)
#
error
"
Without
CLANG_ENABLE_OBJC_WEAK
,
weak
references
should
be
disabled
.
"
#
endif
void
m_fun
()
{}
void
m_fun
()
{}
worker/deps/gyp/test/mac/objc-arc/m-file.m
浏览文件 @
66bb7dcc
...
@@ -2,4 +2,8 @@
...
@@ -2,4 +2,8 @@
#
error
"
ObjC
files
with
CLANG_ENABLE_OBJC_ARC
should
be
ARC
'
d
!"
#
error
"
ObjC
files
with
CLANG_ENABLE_OBJC_ARC
should
be
ARC
'
d
!"
#
endif
#
endif
#
if
!__
has_feature
(
objc_arc_weak
)
#
error
"
Weak
references
should
always
be
enabled
for
ARC
.
"
#
endif
void
m_fun
()
{}
void
m_fun
()
{}
worker/deps/gyp/test/mac/objc-arc/mm-file-arc-weak.mm
0 → 100644
浏览文件 @
66bb7dcc
#if __has_feature(objc_arc)
#error "ObjC++ files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!"
#endif
#if !__has_feature(objc_arc_weak)
#error "With CLANG_ENABLE_OBJC_WEAK, weak references should be enabled."
#endif
void mm_fun() {}
worker/deps/gyp/test/mac/objc-arc/mm-file-no-arc.mm
浏览文件 @
66bb7dcc
...
@@ -2,4 +2,8 @@
...
@@ -2,4 +2,8 @@
#error "ObjC++ files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!"
#error "ObjC++ files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!"
#endif
#endif
#if __has_feature(objc_arc_weak)
#error "Without CLANG_ENABLE_OBJC_WEAK, weak references should be disabled."
#endif
void mm_fun() {}
void mm_fun() {}
worker/deps/gyp/test/mac/objc-arc/mm-file.mm
浏览文件 @
66bb7dcc
...
@@ -2,4 +2,8 @@
...
@@ -2,4 +2,8 @@
#error "ObjC++ files with CLANG_ENABLE_OBJC_ARC should be ARC'd!"
#error "ObjC++ files with CLANG_ENABLE_OBJC_ARC should be ARC'd!"
#endif
#endif
#if !__has_feature(objc_arc_weak)
#error "Weak references should always be enabled for ARC."
#endif
void mm_fun() {}
void mm_fun() {}
worker/deps/gyp/test/mac/objc-arc/test.gyp
浏览文件 @
66bb7dcc
...
@@ -18,13 +18,24 @@
...
@@ -18,13 +18,24 @@
'mm-file.mm',
'mm-file.mm',
],
],
'xcode_settings': {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'MACOSX_DEPLOYMENT_TARGET': '10.6',
'ARCHS': [ 'x86_64' ], # For the non-fragile objc ABI.
'CLANG_ENABLE_OBJC_ARC': 'YES',
'CLANG_ENABLE_OBJC_ARC': 'YES',
},
},
},
},
{
'target_name': 'weak_enabled',
'type': 'static_library',
'sources': [
'c-file.c',
'cc-file.cc',
'm-file-arc-weak.m',
'mm-file-arc-weak.mm',
],
'xcode_settings': {
'CLANG_ENABLE_OBJC_WEAK': 'YES',
},
},
{
{
'target_name': 'arc_disabled',
'target_name': 'arc_disabled',
'type': 'static_library',
'type': 'static_library',
...
@@ -35,9 +46,6 @@
...
@@ -35,9 +46,6 @@
'mm-file-no-arc.mm',
'mm-file-no-arc.mm',
],
],
'xcode_settings': {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'MACOSX_DEPLOYMENT_TARGET': '10.6',
'ARCHS': [ 'x86_64' ], # For the non-fragile objc ABI.
},
},
},
},
],
],
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论