File tree Expand file tree Collapse file tree 11 files changed +30
-17
lines changed Expand file tree Collapse file tree 11 files changed +30
-17
lines changed Original file line number Diff line number Diff line change @@ -64,23 +64,6 @@ if(MSVC)
64
64
xcheck_add_c_compiler_flag (-Wno-reserved-identifier )
65
65
xcheck_add_c_compiler_flag (-Wdeprecated-declarations )
66
66
xcheck_add_c_compiler_flag (/experimental:c11atomics )
67
- xcheck_add_c_compiler_flag (/wd4018 ) # -Wno-sign-conversion
68
- xcheck_add_c_compiler_flag (/wd4061 ) # -Wno-implicit-fallthrough
69
- xcheck_add_c_compiler_flag (/wd4100 ) # -Wno-unused-parameter
70
- xcheck_add_c_compiler_flag (/wd4200 ) # -Wno-zero-length-array
71
- xcheck_add_c_compiler_flag (/wd4242 ) # -Wno-shorten-64-to-32
72
- xcheck_add_c_compiler_flag (/wd4244 ) # -Wno-shorten-64-to-32
73
- xcheck_add_c_compiler_flag (/wd4245 ) # -Wno-sign-compare
74
- xcheck_add_c_compiler_flag (/wd4267 ) # -Wno-shorten-64-to-32
75
- xcheck_add_c_compiler_flag (/wd4388 ) # -Wno-sign-compare
76
- xcheck_add_c_compiler_flag (/wd4389 ) # -Wno-sign-compare
77
- xcheck_add_c_compiler_flag (/wd4456 ) # Hides previous local declaration
78
- xcheck_add_c_compiler_flag (/wd4457 ) # Hides function parameter
79
- xcheck_add_c_compiler_flag (/wd4710 ) # Function not inlined
80
- xcheck_add_c_compiler_flag (/wd4711 ) # Function was inlined
81
- xcheck_add_c_compiler_flag (/wd4820 ) # Padding added after construct
82
- xcheck_add_c_compiler_flag (/wd4996 ) # -Wdeprecated-declarations
83
- xcheck_add_c_compiler_flag (/wd5045 ) # Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
84
67
endif ()
85
68
86
69
# Set a 8MB default stack size on Windows.
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const libunicode_c = loadFile("libunicode.c")
9
9
const libunicode_h = loadFile ( "libunicode.h" )
10
10
const libunicode_table_h = loadFile ( "libunicode-table.h" )
11
11
const list_h = loadFile ( "list.h" )
12
+ const msvc_pragmas_h = loadFile ( "msvc-pragmas.h" )
12
13
const quickjs_atom_h = loadFile ( "quickjs-atom.h" )
13
14
const quickjs_c = loadFile ( "quickjs.c" )
14
15
const quickjs_c_atomics_h = loadFile ( "quickjs-c-atomics.h" )
@@ -23,6 +24,7 @@ const gen_builtin_array_fromasync_h = loadFile("builtin-array-fromasync.h")
23
24
let source = "#if defined(QJS_BUILD_LIBC) && defined(__linux__) && !defined(_GNU_SOURCE)\n"
24
25
+ "#define _GNU_SOURCE\n"
25
26
+ "#endif\n"
27
+ + msvc_pragmas_h
26
28
+ quickjs_c_atomics_h
27
29
+ cutils_h
28
30
+ list_h
@@ -40,6 +42,7 @@ let source = "#if defined(QJS_BUILD_LIBC) && defined(__linux__) && !defined(_GNU
40
42
+ quickjs_libc_h
41
43
+ quickjs_libc_c
42
44
+ "#endif // QJS_BUILD_LIBC\n"
45
+ source = source . replace ( / # i n c l u d e " m s v c - p r a g m a s .h " / g, "" )
43
46
source = source . replace ( / # i n c l u d e " q u i c k j s - a t o m .h " / g, quickjs_atom_h )
44
47
source = source . replace ( / # i n c l u d e " q u i c k j s - o p c o d e .h " / g, quickjs_opcode_h )
45
48
source = source . replace ( / # i n c l u d e " l i b r e g e x p - o p c o d e .h " / g, libregexp_opcode_h )
Original file line number Diff line number Diff line change 22
22
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
23
* THE SOFTWARE.
24
24
*/
25
+ #include "msvc-pragmas.h"
25
26
#include <assert.h>
26
27
#include <stdlib.h>
27
28
#include <stdio.h>
Original file line number Diff line number Diff line change 21
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
* THE SOFTWARE.
23
23
*/
24
+ #include "msvc-pragmas.h"
24
25
#include <stdlib.h>
25
26
#include <stdio.h>
26
27
#include <stdarg.h>
Original file line number Diff line number Diff line change 21
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
* THE SOFTWARE.
23
23
*/
24
+ #include "msvc-pragmas.h"
24
25
#include <stdlib.h>
25
26
#include <stdio.h>
26
27
#include <stdarg.h>
Original file line number Diff line number Diff line change
1
+ #ifdef _MSC_VER
2
+ #pragma warning(disable: 4018) // -Wno-sign-conversion
3
+ #pragma warning(disable: 4061) // -Wno-implicit-fallthrough
4
+ #pragma warning(disable: 4100) // -Wno-unused-parameter
5
+ #pragma warning(disable: 4200) // -Wno-zero-length-array
6
+ #pragma warning(disable: 4242) // -Wno-shorten-64-to-32
7
+ #pragma warning(disable: 4244) // -Wno-shorten-64-to-32
8
+ #pragma warning(disable: 4245) // -Wno-sign-compare
9
+ #pragma warning(disable: 4267) // -Wno-shorten-64-to-32
10
+ #pragma warning(disable: 4388) // -Wno-sign-compare
11
+ #pragma warning(disable: 4389) // -Wno-sign-compare
12
+ #pragma warning(disable: 4456) // Hides previous local declaration
13
+ #pragma warning(disable: 4457) // Hides function parameter
14
+ #pragma warning(disable: 4710) // Function not inlined
15
+ #pragma warning(disable: 4711) // Function was inlined
16
+ #pragma warning(disable: 4820) // Padding added after construct
17
+ #pragma warning(disable: 4996) // -Wdeprecated-declarations
18
+ #pragma warning(disable: 5045) // Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
19
+ #endif
Original file line number Diff line number Diff line change 22
22
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
23
* THE SOFTWARE.
24
24
*/
25
+ #include "msvc-pragmas.h"
25
26
#include <stdlib.h>
26
27
#include <stdio.h>
27
28
#include <stdarg.h>
Original file line number Diff line number Diff line change 23
23
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
24
* THE SOFTWARE.
25
25
*/
26
+ #include "msvc-pragmas.h"
26
27
#include <stdlib.h>
27
28
#include <stdio.h>
28
29
#include <stdarg.h>
Original file line number Diff line number Diff line change 22
22
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
23
* THE SOFTWARE.
24
24
*/
25
+ #include "msvc-pragmas.h"
25
26
#include "quickjs.h"
26
27
#include <stdlib.h>
27
28
#include <stdio.h>
Original file line number Diff line number Diff line change 24
24
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
25
* THE SOFTWARE.
26
26
*/
27
+ #include "msvc-pragmas.h"
27
28
#include <stdlib.h>
28
29
#include <stdio.h>
29
30
#include <stdarg.h>
You can’t perform that action at this time.
0 commit comments