Explorar o código

add GetConfigValue() by Grissiom.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2284 bbd45198-f89e-11dd-88c7-29a3b14d5316
wuyangyong %!s(int64=12) %!d(string=hai) anos
pai
achega
52fdfa1bf8
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      tools/building.py

+ 7 - 0
tools/building.py

@@ -136,6 +136,13 @@ def PrepareModuleBuilding(env, root_directory):
     # add program path
     env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 
+def GetConfigValue(name):
+    assert type(name) == str, 'GetConfigValue: only string parameter is valid'
+    try:
+        return BuildOptions[name]
+    except:
+        return ''
+
 def GetDepend(depend):
     building = True
     if type(depend) == type('str'):