summaryrefslogtreecommitdiff
path: root/core/src/xmake/binutils/mslib
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-10 00:48:15 +0800
committerruki <[email protected]>2025-12-12 09:00:43 +0800
commit094b9b26786db5960947819680ccc49985f5ed55 (patch)
treed980e4bb569b5ac8b6b0c482b09aaabd4eb63b01 /core/src/xmake/binutils/mslib
parent245d472158edc782c4ee7ddb6d47be65270c5451 (diff)
add binutils extractlib
Diffstat (limited to 'core/src/xmake/binutils/mslib')
-rw-r--r--core/src/xmake/binutils/mslib/extractlib.c52
-rw-r--r--core/src/xmake/binutils/mslib/prefix.h30
2 files changed, 82 insertions, 0 deletions
diff --git a/core/src/xmake/binutils/mslib/extractlib.c b/core/src/xmake/binutils/mslib/extractlib.c
new file mode 100644
index 000000000..5cc4a57b4
--- /dev/null
+++ b/core/src/xmake/binutils/mslib/extractlib.c
@@ -0,0 +1,52 @@
+/*!A cross-platform build utility based on Lua
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright (C) 2015-present, Xmake Open Source Community.
+ *
+ * @author ruki
+ * @file extractlib.c
+ *
+ */
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * trace
+ */
+#define TB_TRACE_MODULE_NAME "mslib_extract"
+#define TB_TRACE_MODULE_DEBUG (0)
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * includes
+ */
+#include "prefix.h"
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * implementation
+ */
+
+/* extract MSVC lib archive to directory (placeholder, not yet implemented)
+ *
+ * @param istream the input stream
+ * @param outputdir the output directory
+ * @return tb_true on success, tb_false on failure
+ */
+tb_bool_t xm_binutils_mslib_extract(tb_stream_ref_t istream, tb_char_t const *outputdir) {
+ tb_assert_and_check_return_val(istream && outputdir, tb_false);
+
+ // TODO: implement MSVC lib extraction
+ // MSVC lib format extraction is not yet implemented
+ (void)istream;
+ (void)outputdir;
+ return tb_false;
+}
+
diff --git a/core/src/xmake/binutils/mslib/prefix.h b/core/src/xmake/binutils/mslib/prefix.h
new file mode 100644
index 000000000..9bd5fa4b6
--- /dev/null
+++ b/core/src/xmake/binutils/mslib/prefix.h
@@ -0,0 +1,30 @@
+/*!A cross-platform build utility based on Lua
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Copyright (C) 2015-present, Xmake Open Source Community.
+ *
+ * @author ruki
+ * @file prefix.h
+ *
+ */
+#ifndef XM_BINUTILS_MSLIB_PREFIX_H
+#define XM_BINUTILS_MSLIB_PREFIX_H
+
+/* //////////////////////////////////////////////////////////////////////////////////////
+ * includes
+ */
+#include "../prefix.h"
+
+#endif
+