Skip to content

Commit

Permalink
1.Add apps/python configuration files
Browse files Browse the repository at this point in the history
2.Code optimization
  • Loading branch information
BeichenY1 committed Mar 5, 2024
1 parent 39a85a6 commit 5fb3fdb
Show file tree
Hide file tree
Showing 16 changed files with 1,291 additions and 448 deletions.
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ dialoguer = "0.11.0"
reqwest = { version = "0.11", features = ["json"] }
bytes = "1.5.0"
tokio = { version = "1", features = ["full"] }
lazy_static = "1.4.0"
lazy_static = "1.4.0"
walkdir = "2"
59 changes: 59 additions & 0 deletions apps/python/local/config_linux.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[build]
compiler = "gcc"

## Parser
[[targets]]
name = "lib-Parser"
src = "./Parser"
include_dir = ["./Include/internal", ".", "./Include"]
type = "object"
cflags = "-UHAVE_STD_ATOMIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE"
ldflags = "-r"

## Objects
[[targets]]
name = "lib-Object"
src = "./Objects"
include_dir = ["./Include/internal", ".", "./Include"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE"
ldflags = "-r"

## Python
[[targets]]
name = "lib-Python"
src = "./Python"
src_exclude = ["dup2.c","dynload_aix.c","dynload_dl.c","dynload_hpux.c",
"dynload_stub.c","dynload_win.c","strdup.c"]
include_dir = ["./Include/internal", ".", "./Include"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE -DSOABI='\"cpython-39-x86_64-linux-gnu\"' -DPLATLIBDIR='\"lib\"'"
ldflags = "-r"

## Modules
[[targets]]
name = "lib-Modules"
src = "./Modules"
src_only = ["getbuildinfo.c","config.c","getpath.c","main.c","gcmodule.c","posixmodule.c",
"errnomodule.c","/pwdmodule.c","_sre.c","_codecsmodule.c","_weakref.c",
"_functoolsmodule.c","_operator.c","_collectionsmodule.c","_abc.c",
"itertoolsmodule.c","atexitmodule.c","signalmodule.c","_stat.c","timemodule.c",
"_threadmodule.c","_localemodule.c","_iomodule.c","iobase.c","fileio.c",
"bytesio.c","bufferedio.c","textio.c","stringio.c","faulthandler.c",
"_tracemalloc.c","_peg_parser.c","symtablemodule.c","xxsubtype.c","frozen.c"
]
include_dir = ["./Include/internal", ".", "./Include","./Modules/_io"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE -DPy_BUILD_CORE_BUILTIN -DPYTHONPATH='\"\"' -DPREFIX='\"/usr/local\"' -DEXEC_PREFIX='\"/usr/local\"' -DVERSION='\"3.9\"' -DVPATH='\"\"'"
ldflags = "-r"

# python-exe
[[targets]]
name = "python"
src = "./Programs"
src_only = ["python.c"]
include_dir = "./"
type = "exe"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE"
ldflags = "-Xlinker -export-dynamic -lcrypt -ldl -lm"
deps = ["lib-Parser","lib-Object","lib-Python","lib-Modules"]
81 changes: 81 additions & 0 deletions apps/python/ruxos/config_linux.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
[build]
compiler = "gcc"

[os]
name = "ruxos"
services = ["alloc","paging","irq","fp_simd","multitask","fs","net",
"pipe","epoll","poll","rtc","virtio-9p","select","signal"]
ulib = "ruxmusl"

[os.platform]
name = "aarch64-qemu-virt"
smp = "2"
mode = "release"
log = "error"

[os.platform.qemu]
blk = "y"
net = "y"
graphic = "n"
args = "python3"
v9p = "y"
v9p_path = "./"
#envs = "PYTHONHOME='/',PYTHONPATH='/Lib'"

## Parser
[[targets]]
name = "lib-Parser"
src = "./Parser"
include_dir = ["./Include/internal", ".", "./Include"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE"
ldflags = "-r"

## Objects
[[targets]]
name = "lib-Object"
src = "./Objects"
include_dir = ["./Include/internal", ".", "./Include"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE"
ldflags = "-r"

## Python
[[targets]]
name = "lib-Python"
src = "./Python"
src_exclude = ["dup2.c","dynload_aix.c","dynload_dl.c","dynload_hpux.c",
"dynload_stub.c","dynload_win.c","strdup.c"]
include_dir = ["./Include/internal", ".", "./Include"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE -DSOABI='\"cpython-39-x86_64-linux-gnu\"' -DPLATLIBDIR='\"lib\"'"
ldflags = "-r"

## Modules
[[targets]]
name = "lib-Modules"
src = "./Modules"
src_only = ["getbuildinfo.c","config.c","getpath.c","main.c","gcmodule.c","posixmodule.c",
"errnomodule.c","/pwdmodule.c","_sre.c","_codecsmodule.c","_weakref.c",
"_functoolsmodule.c","_operator.c","_collectionsmodule.c","_abc.c",
"itertoolsmodule.c","atexitmodule.c","signalmodule.c","_stat.c","timemodule.c",
"_threadmodule.c","_localemodule.c","_iomodule.c","iobase.c","fileio.c",
"bytesio.c","bufferedio.c","textio.c","stringio.c","faulthandler.c",
"_tracemalloc.c","_peg_parser.c","symtablemodule.c","xxsubtype.c","frozen.c"
]
include_dir = ["./Include/internal", ".", "./Include","./Modules/_io"]
type = "object"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE -DPy_BUILD_CORE_BUILTIN -DPYTHONPATH='\"\"' -DPREFIX='\"/usr/local\"' -DEXEC_PREFIX='\"/usr/local\"' -DVERSION='\"3.9\"' -DVPATH='\"\"'"
ldflags = "-r"

## python-exe
[[targets]]
name = "python"
src = "./Programs"
src_only = ["python.c"]
include_dir = "./"
type = "exe"
cflags = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -DPy_BUILD_CORE"
linker = "rust-lld -flavor gnu"
ldflags = ""
deps = ["lib-Parser","lib-Object","lib-Python","lib-Modules"]
Loading

0 comments on commit 5fb3fdb

Please sign in to comment.