Fix the slashes when setting the ZapBBInstrDir (dotnet/coreclr#19858)
authorMichelle McDaniel <adiaaida@gmail.com>
Fri, 7 Sep 2018 20:08:25 +0000 (13:08 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Sep 2018 20:08:25 +0000 (13:08 -0700)
commiteea616206272fde4776293716c77a8cc3cbc4c6e
treeb1c29a0903ad48fc6773389b097bcd3c5c356c2a
parentca23f5e7f30abcdb3885c62eb4100056d3f66063
Fix the slashes when setting the ZapBBInstrDir (dotnet/coreclr#19858)

In OpenMethodProfileDataLogFile, we try to set the directory and path for the .ibc files using windows slashes (\). This causes this code to fail on Linux, which uses forward slashes. This is particularly a problem when setting COMPlus_ZapBBInstrDir, which takes that environment variable and attempts to find the name of the file using wcsrchr(assemblyPath, '\'). This causes a crash on linux when collecting IBC counts. The fix is to ifdef it for linux to use the correct path separator.

This change also includes a fix to change the code for checking if IbcTuning is set to use == instead of -eq which was causing a failure in the build that was ignored.

Commit migrated from https://github.com/dotnet/coreclr/commit/d81a3685df482e8962bf696e44b9071f19bfac2f
src/coreclr/build.sh
src/coreclr/src/vm/ceeload.cpp