|
22 | 22 | $(_BeforeWasmBuildAppDependsOn); |
23 | 23 | _SetupEmscripten; |
24 | 24 | _SetWasmBuildNativeDefaults; |
25 | | - _SetWasmNativeStripDefault; |
26 | 25 | _ReadEmccProps |
27 | 26 | </_BeforeWasmBuildAppDependsOn> |
28 | 27 |
|
|
119 | 118 | <_BoolPropertiesThatTriggerRelinking Include="InvariantTimezone" DefaultValueInRuntimePack="false" /> |
120 | 119 | <_BoolPropertiesThatTriggerRelinking Include="InvariantGlobalization" DefaultValueInRuntimePack="false" /> |
121 | 120 | <_BoolPropertiesThatTriggerRelinking Include="WasmNativeStrip" DefaultValueInRuntimePack="true" /> |
| 121 | + <!--<_BoolPropertiesThatTriggerRelinking Include="WasmNativeDebugSymbols" DefaultValueInRuntimePack="true" />--> |
122 | 122 | </ItemGroup> |
123 | 123 |
|
124 | 124 | <PropertyGroup> |
|
133 | 133 | <WasmBuildNative Condition="'$(RunAOTCompilation)' == 'true' and '$(RunAOTCompilationAfterBuild)' == 'true'">true</WasmBuildNative> |
134 | 134 |
|
135 | 135 | <WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative> |
136 | | - <WasmBuildNative Condition="'$(WasmBuildNative)' == ''">false</WasmBuildNative> |
137 | 136 | </PropertyGroup> |
138 | 137 |
|
139 | 138 | <!-- When Publishing --> |
|
147 | 146 |
|
148 | 147 | <!-- default to relinking in Release config --> |
149 | 148 | <WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(Configuration)' == 'Release'">true</WasmBuildNative> |
| 149 | + </PropertyGroup> |
150 | 150 |
|
| 151 | + <PropertyGroup> |
151 | 152 | <WasmBuildNative Condition="'$(WasmBuildNative)' == ''">false</WasmBuildNative> |
152 | 153 | </PropertyGroup> |
153 | 154 |
|
| 155 | + <!-- Default with nothing set: Build+relink+config=debug --> |
| 156 | + <PropertyGroup Condition="'$(WasmNativeDebugSymbols)' == '' and '$(WasmNativeStrip)' == '' and '$(WasmBuildingForNestedPublish)' != 'true' and '$(WasmBuildNative)' == 'true' and '$(Configuration)' == 'Debug'"> |
| 157 | + <WasmNativeDebugSymbols>true</WasmNativeDebugSymbols> |
| 158 | + <WasmNativeStrip>false</WasmNativeStrip> |
| 159 | + </PropertyGroup> |
| 160 | + |
| 161 | + <PropertyGroup> |
| 162 | + <WasmNativeDebugSymbols Condition="'$(WasmNativeDebugSymbols)' == ''">true</WasmNativeDebugSymbols> |
| 163 | + <WasmNativeStrip Condition="'$(WasmNativeStrip)' == ''">true</WasmNativeStrip> |
| 164 | + </PropertyGroup> |
| 165 | + |
154 | 166 | <!-- If we want to default to true, and sdk is missing, then just warn, and set it to false --> |
155 | 167 | <Warning Condition="'$(WasmBuildNative)' == 'true' and '$(_IsEMSDKMissing)' == 'true'" |
156 | 168 | Text="$(_EMSDKMissingErrorMessage) Emscripten SDK is required for building native files." /> |
|
160 | 172 | </PropertyGroup> |
161 | 173 | </Target> |
162 | 174 |
|
163 | | - <Target Name="_SetWasmNativeStripDefault" Condition="'$(WasmNativeStrip)' == ''"> |
164 | | - <PropertyGroup> |
165 | | - <!-- Build+relink+config=debug --> |
166 | | - <WasmNativeStrip Condition="'$(WasmBuildingForNestedPublish)' != 'true' and '$(WasmBuildNative)' == 'true' and '$(Configuration)' == 'Debug'">false</WasmNativeStrip> |
167 | | - <WasmNativeStrip Condition="'$(WasmNativeStrip)' == ''">true</WasmNativeStrip> |
168 | | - </PropertyGroup> |
169 | | - </Target> |
170 | | - |
171 | 175 | <Target Name="_WasmBuildNativeCore" DependsOnTargets="$(_WasmBuildNativeCoreDependsOn)" Condition="'$(WasmBuildNative)' == 'true'" /> |
172 | 176 |
|
173 | 177 | <Target Name="_PrepareForWasmBuildNative"> |
|
178 | 182 | <_MonoAotCrossCompilerPath>@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','browser-wasm'))</_MonoAotCrossCompilerPath> |
179 | 183 | <_EmccDefaultFlagsRsp>$([MSBuild]::NormalizePath($(_WasmRuntimePackSrcDir), 'emcc-default.rsp'))</_EmccDefaultFlagsRsp> |
180 | 184 | <_EmccDefaultLinkFlagsRsp>$([MSBuild]::NormalizePath($(_WasmRuntimePackSrcDir), 'emcc-link.rsp'))</_EmccDefaultLinkFlagsRsp> |
181 | | - <WasmNativeDebugSymbols Condition="'$(WasmNativeDebugSymbols)' == ''">true</WasmNativeDebugSymbols> |
182 | 185 | <WasmLinkIcalls Condition="'$(WasmLinkIcalls)' == ''">$(WasmBuildNative)</WasmLinkIcalls> |
183 | 186 |
|
184 | 187 | <_WasmICallTablePath>$(_WasmIntermediateOutputPath)icall-table.h</_WasmICallTablePath> |
|
221 | 224 |
|
222 | 225 | <_EmccCommonFlags Include="$(_DefaultEmccFlags)" /> |
223 | 226 | <_EmccCommonFlags Include="$(EmccFlags)" /> |
224 | | - <_EmccCommonFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" /> |
| 227 | + <_EmccCommonFlags Include="-g" Condition="'$(WasmNativeStrip)' == 'false'" /> |
225 | 228 | <_EmccCommonFlags Include="-v" Condition="'$(EmccVerbose)' != 'false'" /> |
226 | 229 | <_EmccCommonFlags Include="-s DISABLE_EXCEPTION_CATCHING=0" Condition="'$(WasmEnableExceptionHandling)' == 'false'" /> |
227 | 230 | <_EmccCommonFlags Include="-fwasm-exceptions" Condition="'$(WasmEnableExceptionHandling)' == 'true'" /> |
|
249 | 252 | <_EmccCFlags Include="-emit-llvm" /> |
250 | 253 |
|
251 | 254 | <_EmccCFlags Include=""-I%(_EmccIncludePaths.Identity)"" /> |
| 255 | + <_EmccCFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" /> |
252 | 256 |
|
253 | 257 | <!-- Adding optimization flag at the top, so it gets precedence --> |
254 | 258 | <_EmccLDFlags Include="$(EmccLinkOptimizationFlag)" /> |
|
0 commit comments