Skip to content

Commit c82c9b9

Browse files
author
Rubtsov, Vasily
committed
Deprecated ARCFour; fixes in AES, EC, DLP
- Deprecated the ARCFour functionality. - Fixed a potential security problem in the signing functions over elliptic curves. - Fixed a potential security problem in the key expansion function for AES Encryption. - Fixed some of the compilation warnings observed when building the static dispatcher on Windows* OS. - Fixed minor issues with DLP functions.
1 parent 01aa285 commit c82c9b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1363
-872
lines changed

CHANGELOG.MD

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Intel(R) Integrated Performance Primitives Cryptography (Intel(R) IPP Cryptography)
2+
3+
This is a list of notable changes to Intel(R) IPP Cryptography, in reverse chronological order.
4+
5+
## 2018-08-30
6+
- Deprecated the ARCFour functionality.
7+
- Fixed a potential security problem in the signing functions over elliptic curves.
8+
- Fixed a potential security problem in the key expansion function for AES Encryption.
9+
- Fixed some of the compilation warnings observed when building the static dispatcher on Windows* OS.
10+
- Fixed minor issues with DLP functions.
11+
12+
13+
------------------------------------------------------------------------
14+
Intel is a trademark of Intel Corporation or its subsidiaries in the U.S. and/or other countries.
15+
* Other names and brands may be claimed as the property of others.

README.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Intel(R) Integrated Performance Primitives Cryptography
1+
Intel(R) Integrated Performance Primitives Cryptography
22
=======================================================
33

44
Intel(R) Integrated Performance Primitives (Intel(R) IPP) Cryptography
@@ -92,6 +92,8 @@ Yasm 1.2.2
9292

9393
- Microsoft Visual Studio\* 2015
9494

95+
- Microsoft Visual Studio\* 2017
96+
9597
### Binary Tools for Linux\* OS:
9698

9799
GNU binutils 2.27
@@ -174,14 +176,25 @@ with the options described in [CMake Arguments](#cmake-arguments).
174176
- On Windows\* OS: open the Microsoft Visual Studio\* solution and
175177
run a build.
176178
179+
**Important:** the process used to build the Microsoft Visual Studio solutions results
180+
in debug information being generated for assembly files by default for both Debug and
181+
Release configurations. To build Intel IPP Cryptography library binaries without debug
182+
information in the Release configuration, follow these steps:
183+
184+
1. Right-click a project file and select **Properties**.
185+
2. In the **Configuration** drop-down list, select **Release**.
186+
3. Select the **Microsoft Macro Assembler** tab.
187+
4. Set the value of the **Generate Debug Information** option to **No**.
188+
5. Repeat steps 1-3 for all projects you want to build.
189+
177190
- On Linux\* OS or macOS\*: start a build using makefiles.
178-
191+
179192
At this point, you can shoose to build either static or dynamic libraries.
180193
Depending on the value of the `-DMERGED_BLD:BOOL` option in the `cmake` call in
181194
step 4, you will get a set of separate self-contained libraries optimized
182195
for particular platforms, or a dispatched library with all optimizations.
183196
See the description of `-DMERGED_BLD:BOOL` in [CMake Arguments](#cmake-arguments)
184-
for more information.
197+
for more information.
185198
186199
Built libraries are located in
187200
the `<build_dir>/.build/lib` directory.
@@ -202,11 +215,11 @@ with the options described in [CMake Arguments](#cmake-arguments).
202215
- `-DMERGED_BLD:BOOL=<on|off>` - optional. Defines the configuration
203216
of the Intel IPP Cryptography library to build:
204217
205-
- `-DMERGED_BLD:BOOL=on`: default configuration. Build of a dispatched
218+
- `-DMERGED_BLD:BOOL=on`: default configuration. Build of a dispatched
206219
static library with all available optimizations; build of dynamic
207220
libraries with a dynamic dispatcher library.
208221
209-
- `-DMERGED_BLD:BOOL=off`: Build of one static library per
222+
- `-DMERGED_BLD:BOOL=off`: build of one static library per
210223
optimization; build of one dynamic library per optimization.
211224
212225
- `-DTHREADED_LIB:BOOL=<off|on>` - optional. Defines the threading
@@ -218,7 +231,7 @@ with the options described in [CMake Arguments](#cmake-arguments).
218231
- `-DTHREADED_LIB:BOOL=on`: build multi-threaded Intel IPP Cryptography
219232
library.
220233
221-
- `-DPLATFORM_LIST="<platform list>"` -- optional, works only if
234+
- `-DPLATFORM_LIST="<platform list>"` - optional, works only if
222235
`-DMERGED_BLD:BOOL=off` is set. Sets target platforms for the code
223236
to be compiled. See the supported platform list at
224237
<https://software.intel.com/en-us/ipp-dev-guide-dispatching>.
@@ -248,12 +261,12 @@ CC=<path to C compiler> CXX=<path to C++ compiler> cmake <Arguments>
248261
- `-T<Compiler>` - defines the compiler for building, for example,
249262
`-T"Intel C++ Compiler 18.0"` defines Intel(R) Compiler 18.0 for
250263
building.
251-
264+
252265
**Note:** Refer to CMake documentation for more information on these options.
253266
254267
#### Linux\* OS CMake Arguments:
255268
256-
- `-DNONPIC_LIB:BOOL=<off|on>` -optional. Defines whether the built
269+
- `-DNONPIC_LIB:BOOL=<off|on>` - optional. Defines whether the built
257270
library will be position-dependent or not:
258271
259272
- `-DNONPIC_LIB:BOOL=off:` default. Position-independent code.
@@ -271,7 +284,7 @@ CC=<path to C compiler> CXX=<path to C++ compiler> cmake <Arguments>
271284
`"x86_64-linux-android-"` defines the prefix for x86_64 GNU compiler
272285
tools.
273286
274-
Note: Before running CMake scripts for cross-platform build for
287+
**Note:** Before running CMake scripts for cross-platform build for
275288
Android\* OS, you need to do the following:
276289
277290
1. Set the following environment variables for Android\* NDK:
@@ -294,7 +307,7 @@ CC=<path to C compiler> CXX=<path to C++ compiler> cmake <Arguments>
294307
295308
- `-DUSEYASM=<path to Yasm* assembly>` - defines the path to the
296309
Yasm\* assembly compiler.
297-
310+
298311
299312
See Also
300313
--------
@@ -305,12 +318,12 @@ See Also
305318
306319
Legal Information
307320
-----------------
308-
No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document.
309-
Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
321+
No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document.
322+
Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
310323
311-
This document contains information on products, services and/or processes in development. All information provided here is subject to change without notice. Contact your Intel representative to obtain the latest forecast, schedule, specifications and roadmaps.
324+
This document contains information on products, services and/or processes in development. All information provided here is subject to change without notice. Contact your Intel representative to obtain the latest forecast, schedule, specifications and roadmaps.
312325
313-
The products and services described may contain defects or errors known as errata which may cause deviations from published specifications. Current characterized errata are available on request.
326+
The products and services described may contain defects or errors known as errata which may cause deviations from published specifications. Current characterized errata are available on request.
314327
315328
Intel, and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
316329

include/ippcp.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,16 +355,24 @@ IPPAPI(IppStatus, ippsAES_CMACGetTag,(Ipp8u* pMD, int mdLen, const IppsAES_CMACS
355355
// RC4 Stream Ciphers
356356
// =========================================================
357357
*/
358+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
358359
IPPAPI(IppStatus, ippsARCFourCheckKey, (const Ipp8u *pKey, int keyLen, IppBool* pIsWeak))
359360

361+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
360362
IPPAPI(IppStatus, ippsARCFourGetSize, (int* pSize))
363+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
361364
IPPAPI(IppStatus, ippsARCFourInit, (const Ipp8u *pKey, int keyLen, IppsARCFourState *pCtx))
365+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
362366
IPPAPI(IppStatus, ippsARCFourReset, (IppsARCFourState* pCtx))
363367

368+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
364369
IPPAPI(IppStatus, ippsARCFourPack,(const IppsARCFourState* pCtx, Ipp8u* pBuffer))
370+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
365371
IPPAPI(IppStatus, ippsARCFourUnpack,(const Ipp8u* pBuffer, IppsARCFourState* pCtx))
366372

373+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
367374
IPPAPI(IppStatus, ippsARCFourEncrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx))
375+
IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
368376
IPPAPI(IppStatus, ippsARCFourDecrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx))
369377

370378

include/ippversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
#define IPP_VERSION_MINOR 0
5454
#define IPP_VERSION_UPDATE 0
5555

56-
#define IPP_VERSION_STR "2019.0.0 Beta Refresh"
56+
#define IPP_VERSION_STR "2019.0.0"
5757

5858
#endif /* IPPVERSION_H__ */

sources/cmake/android/Intel18.0.0.cmake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,17 @@ if(${ARCH} MATCHES "ia32")
6565
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc -falign-stack=maintain-16-byte -Wa,--32 -no-use-asm -m32")
6666
else()
6767
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc")
68-
endif(${ARCH} MATCHES "ia32")
68+
endif(${ARCH} MATCHES "ia32")
69+
70+
set(w7_opt "${w7_opt} -xSSE2")
71+
set(s8_opt "${s8_opt} -xATOM_SSSE3 -minstruction=nomovbe")
72+
set(p8_opt "${p8_opt} -xATOM_SSE4.2 -minstruction=nomovbe")
73+
set(g9_opt "${g9_opt} -xAVX")
74+
set(h9_opt "${h9_opt} -xCORE-AVX2")
75+
set(m7_opt "${m7_opt} -xSSE3")
76+
set(n8_opt "${n8_opt} -xATOM_SSSE3 -minstruction=nomovbe")
77+
set(y8_opt "${y8_opt} -xATOM_SSE4.2 -minstruction=nomovbe")
78+
set(e9_opt "${e9_opt} -xAVX")
79+
set(l9_opt "${l9_opt} -xCORE-AVX2")
80+
set(n0_opt "${n0_opt} -xMIC-AVX512")
81+
set(k0_opt "${k0_opt} -xCORE-AVX512")

sources/cmake/linux/Intel18.0.0.cmake

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,44 @@
4242
# Intel(R) Integrated Performance Primitives (Intel(R) IPP) Cryptography
4343
#
4444

45-
# linker
46-
set(LINK_FLAG_DYNAMIC_LINUX "-nostdlib -Wl,-shared -Wl,-z,defs -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-call_shared,-lc -Wl,-call_shared,-lm")
45+
# Linker flags
46+
47+
# Security flags
48+
set(LINK_FLAG_SECURITY "")
49+
# Disallows undefined symbols in object files. Undefined symbols in shared libraries are still allowed
50+
set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,defs")
51+
# Stack execution protection
52+
set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,noexecstack")
53+
# Data relocation and protection (RELRO)
54+
set(LINK_FLAG_SECURITY "${LINK_FLAG_SECURITY} -Wl,-z,relro -Wl,-z,now")
55+
56+
set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_SECURITY} -nostdlib -Wl,-shared -Wl,-call_shared,-lc -Wl,-call_shared,-lm")
4757
if(${ARCH} MATCHES "ia32")
4858
set(LINK_FLAG_DYNAMIC_LINUX "${LINK_FLAG_DYNAMIC_LINUX} -Wl,-m,elf_i386")
4959
endif(${ARCH} MATCHES "ia32")
5060

51-
set(LINK_FLAG_PCS_LINUX "-nostdlib -Wl,-call_shared,-ldl -Wl,-call_shared,-lc -Wl,-call_shared,-lm") #check lm lc
61+
set(LINK_FLAG_PCS_LINUX "${LINK_FLAG_SECURITY} -nostdlib -Wl,-shared -Wl,-call_shared,-ldl -Wl,-call_shared,-lc -Wl,-call_shared,-lm")
5262
if(${ARCH} MATCHES "ia32")
5363
set(LINK_FLAG_PCS_LINUX "${LINK_FLAG_PCS_LINUX} -Wl,-m,elf_i386")
5464
endif(${ARCH} MATCHES "ia32")
5565

56-
# compiler
66+
# Compiler flags
5767
set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "-fasm-blocks -use_msasm -w -m32 -fomit-frame-pointer")
5868

5969
set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "-fasm-blocks -use_msasm -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")
6070

6171
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} ${LIBRARY_DEFINES}")
6272

63-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding -restrict -qopt-report2 -qopt-report-phase:vec -std=c99 -falign-functions=32 -falign-loops=32 -diag-error 266 -diag-disable 13366 -Wformat -Wformat-security -fstack-protector")
73+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding -restrict -qopt-report2 -qopt-report-phase:vec -std=c99 -falign-functions=32 -falign-loops=32 -diag-error 266 -diag-disable 13366")
74+
75+
# Stack-based Buffer Overrun Detection
76+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
77+
78+
# Format string vulnerabilities
79+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security")
80+
6481
if(NOT NONPIC_LIB)
82+
# Position Independent Execution (PIE)
6583
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")
6684
endif()
6785
if(THREADED_LIB)
@@ -71,8 +89,26 @@ if(CODE_COVERAGE)
7189
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -prof-gen:srcpos -prof-dir ${PROF_DATA_DIR}")
7290
endif()
7391

92+
set (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG" CACHE STRING "" FORCE)
93+
set (CMAKE_C_FLAGS_RELEASE_INIT " -O3 -DNDEBUG" CACHE STRING "" FORCE)
94+
7495
if(${ARCH} MATCHES "ia32")
7596
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc -falign-stack=maintain-16-byte -Wa,--32 -no-use-asm -m32")
7697
else()
7798
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-sox -Zp16 -gcc")
78-
endif(${ARCH} MATCHES "ia32")
99+
endif(${ARCH} MATCHES "ia32")
100+
101+
set(px_opt "${px_opt} -mia32")
102+
set(w7_opt "${w7_opt} -xSSE2")
103+
set(s8_opt "${s8_opt} -xATOM_SSSE3 -minstruction=nomovbe")
104+
set(p8_opt "${p8_opt} -xATOM_SSE4.2 -minstruction=nomovbe")
105+
set(g9_opt "${g9_opt} -xAVX")
106+
set(h9_opt "${h9_opt} -xCORE-AVX2")
107+
set(mx_opt "${mx_opt} -march=pentium")
108+
set(m7_opt "${m7_opt} -xSSE3")
109+
set(n8_opt "${n8_opt} -xATOM_SSSE3 -minstruction=nomovbe")
110+
set(y8_opt "${y8_opt} -xATOM_SSE4.2 -minstruction=nomovbe")
111+
set(e9_opt "${e9_opt} -xAVX")
112+
set(l9_opt "${l9_opt} -xCORE-AVX2")
113+
set(n0_opt "${n0_opt} -xMIC-AVX512")
114+
set(k0_opt "${k0_opt} -xCORE-AVX512")

sources/cmake/macosx/Intel18.0.0.cmake

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#
4444

4545
# linker
46-
set(LINK_FLAG_DYNAMIC_MACOSX "-Wl,-dynamic -Wl,-noall_load -Wl,-single_module -Wl,-flat_namespace -Wl,-headerpad_max_install_names")
46+
set(LINK_FLAG_DYNAMIC_MACOSX "-Wl,-dynamic -Wl,-single_module -Wl,-flat_namespace -Wl,-headerpad_max_install_names")
4747
set(LINK_FLAG_DYNAMIC_MACOSX "${LINK_FLAG_DYNAMIC_MACOSX} -Wl,-current_version,2019.0.0 -Wl,-compatibility_version,2019.0 -Wl,-macosx_version_min,10.7")
4848
set(LINK_FLAG_DYNAMIC_MACOSX "${LINK_FLAG_DYNAMIC_MACOSX} -nostdlib -Wl,-lgcc_s.1 -Wl,-lm")
4949
if(${ARCH} MATCHES "ia32")
@@ -58,7 +58,7 @@ set(CC_FLAGS_INLINE_ASM_UNIX_IA32 "-fasm-blocks -use_msasm -w -m32 -fomit-frame-
5858

5959
set(CC_FLAGS_INLINE_ASM_UNIX_INTEL64 "-fasm-blocks -use_msasm -ffixed-rdi -ffixed-rsi -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rbp -ffixed-r8 -ffixed-r9 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15")
6060

61-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} ${LIBRARY_DEFINES}")
61+
set(CMAKE_C_FLAGS "${LIBRARY_DEFINES}")
6262

6363
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding -restrict -qopt-report2 -qopt-report-phase:vec -std=c99 -falign-functions=32 -falign-loops=32 -diag-error 266 -diag-disable 13366 -Wformat -Wformat-security -fstack-protector")
6464
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fPIC")
@@ -74,3 +74,16 @@ if(${ARCH} MATCHES "ia32")
7474
else()
7575
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
7676
endif(${ARCH} MATCHES "ia32")
77+
78+
set(w7_opt "${w7_opt} -xSSE2")
79+
set(s8_opt "${s8_opt} -xSSE3")
80+
set(p8_opt "${p8_opt} -xSSE4.2")
81+
set(g9_opt "${g9_opt} -xAVX")
82+
set(h9_opt "${h9_opt} -xCORE-AVX2")
83+
set(m7_opt "${m7_opt} -xSSE3")
84+
set(n8_opt "${n8_opt} -xSSSE3")
85+
set(y8_opt "${y8_opt} -xSSE4.2")
86+
set(e9_opt "${e9_opt} -xAVX")
87+
set(l9_opt "${l9_opt} -xCORE-AVX2")
88+
set(n0_opt "${n0_opt} -xMIC-AVX512")
89+
set(k0_opt "${k0_opt} -xCORE-AVX512")

sources/cmake/windows/Intel18.0.0.cmake

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@
4343
#
4444

4545
# linker
46+
set(LINK_FLAG_STATIC_WINDOWS "")
4647
set(LINK_FLAG_DYNAMIC_WINDOWS "/nologo /VERBOSE:SAFESEH /INCREMENTAL:NO /NXCOMPAT /DYNAMICBASE")
48+
49+
# supress warning LNK4221:
50+
# "This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library"
51+
set(LINK_FLAG_STATIC_WINDOWS "${LINK_FLAG_STATIC_WINDOWS} /ignore:4221")
52+
set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /ignore:4221")
53+
4754
if(${ARCH} MATCHES "ia32")
4855
set(LINK_FLAG_DYNAMIC_WINDOWS "${LINK_FLAG_DYNAMIC_WINDOWS} /SAFESEH")
4956
endif(${ARCH} MATCHES "ia32")
@@ -55,9 +62,9 @@ set(LINK_LIB_STATIC_RELEASE ${LINK_LIB_STATIC_RELEASE_VS2015})
5562
set(LINK_LIB_STATIC_DEBUG ${LINK_LIB_STATIC_DEBUG_VS2015})
5663

5764
# compiler
58-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} ${LIBRARY_DEFINES}")
65+
set(CMAKE_C_FLAGS "${LIBRARY_DEFINES}")
5966

60-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nologo -Qfp-speculation:safe -Qfreestanding -X -W4 -GS -Qdiag-error:266 -Qdiag-disable:13366 /Qfnalign:32 /Qalign-loops:32 -Qrestrict -Zp16 -Qvc12 -Qopt-report2 -Qopt-report-phase:vec -Qopt-report-stdout -Qsox- /Gy -Qstd=c99")
67+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nologo -Qfp-speculation:safe -Qfreestanding -X /W4 -GS -Qdiag-error:266 -Qdiag-disable:13366 /Qfnalign:32 /Qalign-loops:32 -Qrestrict -Zp16 -Qvc12 -Qopt-report2 -Qopt-report-phase:vec -Qopt-report-stdout -Qsox- /Gy -Qstd=c99")
6168
if(THREADED_LIB)
6269
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qopenmp -Qopenmp-lib:compat")
6370
endif()
@@ -66,4 +73,25 @@ if(CODE_COVERAGE)
6673
endif()
6774

6875
set(CMAKE_C_FLAGS_DEBUG "/MTd /Zi /Od /Ob2 /DDEBUG" CACHE STRING "" FORCE)
69-
set(CMAKE_C_FLAGS_RELEASE "/MT /Zl /O3 /Ob2 /DNDEBUG" CACHE STRING "" FORCE)
76+
set(CMAKE_C_FLAGS_RELEASE "/MT /Zl /O3 /Ob2 /DNDEBUG" CACHE STRING "" FORCE)
77+
78+
set (CMAKE_C_FLAGS_DEBUG_INIT "/MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "" FORCE)
79+
set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG /MD /Zl /O3 /Ob2 /DNDEBUG" CACHE STRING "" FORCE)
80+
81+
# supress warning #10120: overriding '/O2' with '/O3'
82+
# CMake bug: cmake cannot change the property "Optimization" to /O3 in MSVC project
83+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd10120")
84+
85+
set(w7_opt "${w7_opt} -QxSSE2")
86+
set(s8_opt "${s8_opt} -QxATOM_SSSE3 -Qinstruction=nomovbe")
87+
set(p8_opt "${p8_opt} -QxATOM_SSE4.2 -Qinstruction=nomovbe")
88+
set(g9_opt "${g9_opt} -QxAVX")
89+
set(h9_opt "${h9_opt} -QxCORE-AVX2")
90+
set(m7_opt "${m7_opt} -QxSSE3")
91+
set(n8_opt "${n8_opt} -QxATOM_SSSE3 -Qinstruction=nomovbe")
92+
set(y8_opt "${y8_opt} -QxATOM_SSE4.2 -Qinstruction=nomovbe")
93+
set(e9_opt "${e9_opt} -QxAVX")
94+
set(l9_opt "${l9_opt} -QxCORE-AVX2")
95+
set(n0_opt "${n0_opt} -QxMIC-AVX512")
96+
set(k0_opt "${k0_opt} -QxCORE-AVX512")
97+

0 commit comments

Comments
 (0)