File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: af56e2efde5cd82564e32598889d25d798c02722
2
+ refs/heads/master: d97b4af15353c488ddd48a7e208906f84f7654c5
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 857ef6e272e5634cb9f3e6ee50eb6bc2a2e71651
5
5
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
Original file line number Diff line number Diff line change @@ -80,10 +80,13 @@ def run(args):
80
80
assert ('stdlib=libc++' not in out )
81
81
f .write ("#[link(name = \" stdc++\" , kind = \" static\" )]\n " )
82
82
else :
83
+ # Note that we use `cfg_attr` here because on MSVC the C++ standard library
84
+ # is not c++ or stdc++, but rather the linker takes care of linking the
85
+ # right standard library.
83
86
if 'stdlib=libc++' in out :
84
- f .write ("#[link(name = \" c++\" )]\n " )
87
+ f .write ("#[cfg_attr(not(target_env = \" msvc \" ), link(name = \" c++\" ) )]\n " )
85
88
else :
86
- f .write ("#[link(name = \" stdc++\" )]\n " )
89
+ f .write ("#[cfg_attr(not(target_env = \" msvc \" ), link(name = \" stdc++\" ) )]\n " )
87
90
88
91
# Attach everything to an extern block
89
92
f .write ("extern {}\n " )
You can’t perform that action at this time.
0 commit comments