Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match base flags #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions modules/libcom/src/osi/os/WIN32/osdThread.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,6 @@ static unsigned WINAPI epicsWin32ThreadEntry ( LPVOID lpParameter )
BOOL success;

if ( pGbl ) {
setThreadName ( pParm->id, pParm->pName );

success = FlsSetValue ( pGbl->flsIndexThreadLibraryEPICS, pParm );
if ( success ) {
osdThreadHooksRun ( ( epicsThreadId ) pParm );
Expand Down Expand Up @@ -655,6 +653,7 @@ epicsThreadId epicsThreadCreateOpt (
pParmWIN32->id = ( DWORD ) threadId ;
}

setThreadName ( pParmWIN32->id, pParmWIN32->pName );
osdPriority = epicsThreadGetOsdPriorityValue (opts->priority);
bstat = SetThreadPriority ( pParmWIN32->handle, osdPriority );
if (!bstat) {
Expand Down
2 changes: 1 addition & 1 deletion modules/libcom/src/osi/os/WIN32/osdTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ void currentTime :: startPLL ()
CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION,
& this->threadId );
assert ( this->threadHandle );
setThreadName ( this->threadId, "EPICS Time PLL" );
BOOL bstat = SetThreadPriority (
this->threadHandle, THREAD_PRIORITY_HIGHEST );
assert ( bstat );
Expand Down Expand Up @@ -496,7 +497,6 @@ static unsigned __stdcall _pllThreadEntry ( void * pCurrentTimeIn )
{
currentTime * pCT =
reinterpret_cast < currentTime * > ( pCurrentTimeIn );
setThreadName ( pCT->threadId, "EPICS Time PLL" );
while ( ! pCT->threadShutdownCmd ) {
Sleep ( currentTime :: pllDelay * 1000 /* mS */ );
pCT->updatePLL ();
Expand Down
15 changes: 14 additions & 1 deletion src/python/epicscorelibs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,21 @@ def _makebuild():

if OS_CLASS=='WIN32':
build['CPPFLAGS'] += [('EPICS_BUILD_DLL', None), ('EPICS_CALL_DLL', None), ('NOMINMAX', None)]
build['CXXFLAGS'] += ['-EHsc']
build['CPPFLAGS'] += [('_CRT_SECURE_NO_DEPRECATE', None), ('_CRT_NONSTDC_NO_DEPRECATE', None)]
build['CPPFLAGS'] += [('_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING', None), ('__STDC__', 0)]
# epics base uses -Ox whereas python passes -O2. Difference is -GF -Gy, we can disable
# -Gy with -Gy- but to disable -GF we probably need to disable optimisation and then re-enable
# it as in -Od -Ox though leaving as is with -GF is probably fine
# so we may be able to skip the change_o2_to_ox in future
change_o2_to_ox = ['-Od', '-Ox']
build['CFLAGS'] += change_o2_to_ox + ['-Oy-', '-Gy-']
build['CXXFLAGS'] += change_o2_to_ox + ['-Oy-', '-Gy-', '-EHsc', '-GR', '-TP']
build['LDFLAGS'] += ['-opt:ref', '-release', '-version:7.0']
build['LDADD'] += ['netapi32', 'ws2_32', 'advapi32', 'user32']
if True:
build['CFLAGS'] += ['-Z7', '-GL-']
build['CXXFLAGS'] += ['-Z7', '-GL-']
build['LDFLAGS'] += ['-debug', '-ltcg:off', '-opt:ref,noicf']

try:
from ._config import cxxdefs
Expand Down
Loading