Attempt to let skia's SSE files build with clang-cl.
cl.exe can use intrinsics (like e.g. _mm_cvtsi128_si32()) even if arch targetted by the compiler doesn't support the SSE level needed by the intrinsic. clang (and gcc) can't do this, because it converts intrinsics into general LLVM operations, and the LLVM bitcode is then translated back into assembly later on, based on the target arch. So explicitly enable SSSE3 and SSE4 when using clang-cl, so that the intrinsics compile. (It's unfortunate that clang-cl deviates fairly heavily from cl in this regard. But this is very difficult to change, and it's the only larger deviation so far.) BUG=82385 R=rnk@chromium.org Review URL: https://codereview.chromium.org/475273002 Cr-Commit-Position: refs/heads/master@{#289735} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289735 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -177,6 +177,13 @@
|
||||
'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES',
|
||||
},
|
||||
}],
|
||||
[ 'OS == "win" and clang == 1', {
|
||||
# cl.exe's /arch flag doesn't have a setting for SSSE3, and cl.exe
|
||||
# doesn't need it for intrinsics. clang-cl does need it, though.
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': { 'AdditionalOptions': [ '-mssse3' ] },
|
||||
},
|
||||
}],
|
||||
[ 'OS == "win"', {
|
||||
'include_dirs': [
|
||||
'config/win',
|
||||
@ -226,6 +233,13 @@
|
||||
'GCC_ENABLE_SSE41_EXTENSIONS': 'YES',
|
||||
},
|
||||
}],
|
||||
[ 'OS == "win" and clang == 1', {
|
||||
# cl.exe's /arch flag doesn't have a setting for SSE4.1, and cl.exe
|
||||
# doesn't need it for intrinsics. clang-cl does need it, though.
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': { 'AdditionalOptions': [ '-msse4.1' ] },
|
||||
},
|
||||
}],
|
||||
[ 'OS == "win"', {
|
||||
'defines' : [
|
||||
'SK_CPU_SSE_LEVEL=41'
|
||||
|
Reference in New Issue
Block a user