Skip to content

Commit

Permalink
Remove unixcoreruncommon static lib dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Nov 23, 2020
1 parent caf802d commit 04283a3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 39 deletions.
1 change: 0 additions & 1 deletion src/coreclr/src/hosts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ if(CLR_CMAKE_HOST_WIN32)
add_subdirectory(coreshim)
else(CLR_CMAKE_HOST_WIN32)
add_definitions(-D_FILE_OFFSET_BITS=64)
add_subdirectory(unixcoreruncommon)
add_subdirectory(unixcorerun)
endif(CLR_CMAKE_HOST_WIN32)
26 changes: 6 additions & 20 deletions src/coreclr/src/hosts/unixcorerun/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
project(unixcorerun)

include_directories(../unixcoreruncommon)
include_directories("${CLR_SRC_NATIVE_DIR}/common")
include(configure.cmake)

set(CORERUN_SOURCES
corerun.cpp
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

_add_executable(corerun
${CORERUN_SOURCES}
corerun.cpp
coreruncommon.cpp
)

# FreeBSD and NetBSD implement dlopen(3) in libc
if(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD)
target_link_libraries(corerun
dl
)
endif(NOT CLR_CMAKE_TARGET_FREEBSD AND NOT CLR_CMAKE_TARGET_NETBSD)

# Libc turns locks into no-ops if pthread was not loaded into process yet. Loading
# pthread by the process executable ensures that all locks are initialized properly.
target_link_libraries(corerun
unixcoreruncommon
)
target_link_libraries(corerun ${CMAKE_DL_LIBS})

# Android implements pthread natively
if(NOT CLR_CMAKE_TARGET_ANDROID)
target_link_libraries(corerun
pthread
)
target_link_libraries(corerun pthread)
endif()

install_clr(TARGETS corerun)
3 changes: 1 addition & 2 deletions src/coreclr/src/hosts/unixcorerun/corerun.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#include <coreruncommon.h>
#include "coreruncommon.h"
#include <getexepath.h>
#include <string>
#include <string.h>
#include <sys/stat.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// Code that is used by both the Unix corerun and coreconsole.
//

#include "config.h"

#include <cstdlib>
#include <cstring>
#include <assert.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#include "config.h"
#include <string>

// Get absolute path from the specified path.
Expand Down
14 changes: 0 additions & 14 deletions src/coreclr/src/hosts/unixcoreruncommon/CMakeLists.txt

This file was deleted.

0 comments on commit 04283a3

Please sign in to comment.