This is an archive of the discontinued LLVM Phabricator instance.

fix Go windows build
AbandonedPublic

Authored by randall77 on Oct 1 2019, 8:25 AM.

Details

Summary

Don't use weak exports when building tsan into a shared library for Go. gcc can't handle the pragmas used to make the weak references.

Include files that have been added since the last update to build.bat. (We should really find a better way to list all the files needed.)

Add windows version defines (WINVER and _WIN32_WINNT) to get AcquireSRWLockExclusive and ReleaseSRWLockExclusive defined.

Define GetProcessMemoryInfo to use the kernel32 version. This is kind of a hack, the windows header files should do this translation for us. I think we're not in the right family partition (we're using Desktop, but that translation only happens for App and System partitions???), but hacking the family partition seems equally gross and I have no idea what the consequences of that might be.

Diff Detail

Event Timeline

randall77 created this revision.Oct 1 2019, 8:25 AM

Can you please convert this file (in a separate patch) into

type ^
  tsan_go.cpp ^
  ..\rtl\tsan_interface_atomic.cpp ^
  ..\rtl\tsan_clock.cpp ^
  ..\rtl\tsan_flags.cpp ^
...

gcc ^
  -c gotsan.cpp ^
  -o race_windows_amd64.syso ^
  -I..\rtl ^
...

could you please, if possible, to use "arc diff" to upload patches? Not required, but lets see "context" inplace.
and than rebase this one to see changes?

randall77 abandoned this revision.Oct 7 2019, 3:01 PM

Abandoning in favor of D68599