mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[chakracore] Fix compilation command running path (#38392)
Fix one of https://github.com/microsoft/vcpkg/issues/32398 issue. The local test is compiled and passed under Linux. However, there is no clang compiler on the CI environment, causing the compilation to fail, so the restrictions in ci.baseline.txt cannot be lifted. - [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] ~~SHA512s are updated for each updated download.~~ - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file. Compile test pass with following triplets: ``` x64-linux x64-windows ```
This commit is contained in:
parent
de344eec35
commit
7d693d2446
@ -40,17 +40,18 @@ else()
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
|
||||
set(CHAKRACORE_TARGET_ARCH x86)
|
||||
endif()
|
||||
|
||||
|
||||
if (VCPKG_TARGET_IS_LINUX)
|
||||
message(WARNING "${PORT} requires Clang from the system package manager, this can be installed on Ubuntu systems via sudo apt install clang")
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${BUILDTREE_PATH}-dbg")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||
list(APPEND configs "debug")
|
||||
execute_process(
|
||||
COMMAND bash "build.sh" "--arch=${CHAKRACORE_TARGET_ARCH}" "--debug" "-j=${VCPKG_CONCURRENCY}"
|
||||
WORKING_DIRECTORY "${BUILDTREE_PATH}-dbg"
|
||||
|
||||
WORKING_DIRECTORY "${SOURCE_PATH}"
|
||||
|
||||
OUTPUT_VARIABLE CHAKRA_BUILD_SH_OUT
|
||||
ERROR_VARIABLE CHAKRA_BUILD_SH_ERR
|
||||
RESULT_VARIABLE CHAKRA_BUILD_SH_RES
|
||||
@ -58,26 +59,27 @@ else()
|
||||
ECHO_ERROR_VARIABLE
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
file(MAKE_DIRECTORY "${BUILDTREE_PATH}-rel")
|
||||
list(APPEND configs "release")
|
||||
execute_process(
|
||||
COMMAND bash "build.sh" "--arch=${CHAKRACORE_TARGET_ARCH}" "-j=${VCPKG_CONCURRENCY}"
|
||||
WORKING_DIRECTORY "${BUILDTREE_PATH}-rel"
|
||||
WORKING_DIRECTORY "${SOURCE_PATH}"
|
||||
OUTPUT_VARIABLE CHAKRA_BUILD_SH_OUT
|
||||
ERROR_VARIABLE CHAKRA_BUILD_SH_ERR
|
||||
RESULT_VARIABLE CHAKRA_BUILD_SH_RES
|
||||
ECHO_OUTPUT_VARIABLE
|
||||
ECHO_ERROR_VARIABLE
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
"${BUILDTREE_PATH}-rel/lib/Jsrt/ChakraCore.h"
|
||||
"${BUILDTREE_PATH}-rel/lib/Jsrt/ChakraCommon.h"
|
||||
"${BUILDTREE_PATH}-rel/lib/Jsrt/ChakraDebug.h"
|
||||
"${SOURCE_PATH}/lib/Jsrt/ChakraCore.h"
|
||||
"${SOURCE_PATH}/lib/Jsrt/ChakraCommon.h"
|
||||
"${SOURCE_PATH}/lib/Jsrt/ChakraDebug.h"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/include"
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
file(INSTALL
|
||||
"${BUILDTREE_PATH}-rel/lib/Jsrt/ChakraCommonWindows.h"
|
||||
@ -86,21 +88,14 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
)
|
||||
else()
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(out_file libChakraCore.so)
|
||||
file(INSTALL "${SOURCE_PATH}/out/Debug/libChakraCore.so" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(INSTALL "${SOURCE_PATH}/out/Release/libChakraCore.so" DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
else()
|
||||
set(out_file lib/libChakraCoreStatic.a)
|
||||
file(INSTALL "${SOURCE_PATH}/out/Debug/lib/libChakraCoreStatic.a" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(INSTALL "${SOURCE_PATH}/out/Release/lib/libChakraCoreStatic.a" DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
|
||||
set(destination_dir_debug "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
set(destination_dir_release "${CURRENT_PACKAGES_DIR}/bin")
|
||||
set(out_dir_debug "${BUILDTREE_PATH}-dbg/out/Debug")
|
||||
set(out_dir_release "${BUILDTREE_PATH}-rel/out/Release")
|
||||
foreach(config ${configs})
|
||||
file(INSTALL
|
||||
${out_dir_${config}}/${out_file}
|
||||
DESTINATION ${destination_dir_${config}}
|
||||
)
|
||||
endforeach()
|
||||
set(out_dir_release "${SOURCE_PATH}/out/Release")
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(INSTALL
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "chakracore",
|
||||
"version-date": "2024-04-20",
|
||||
"version-date": "2022-11-09",
|
||||
"port-version": 7,
|
||||
"description": "Core part of the Chakra Javascript engine",
|
||||
"homepage": "https://github.com/Microsoft/ChakraCore",
|
||||
"license": "MIT",
|
||||
|
@ -1569,8 +1569,8 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"chakracore": {
|
||||
"baseline": "2024-04-20",
|
||||
"port-version": 0
|
||||
"baseline": "2022-11-09",
|
||||
"port-version": 7
|
||||
},
|
||||
"charls": {
|
||||
"baseline": "2.4.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "04e8036ad8fd92b15cd9186794c4d1d68c4f6479",
|
||||
"version-date": "2022-11-09",
|
||||
"port-version": 7
|
||||
},
|
||||
{
|
||||
"git-tree": "e1446838cc63899b04eee045e2744d7d59a42a14",
|
||||
"version-date": "2024-04-20",
|
||||
|
Loading…
x
Reference in New Issue
Block a user