{"action":"created","issue":{"url":"https://api.github.com/repos/ctuning/ck/issues/67","repository_url":"https://api.github.com/repos/ctuning/ck","labels_url":"https://api.github.com/repos/ctuning/ck/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/ctuning/ck/issues/67/comments","events_url":"https://api.github.com/repos/ctuning/ck/issues/67/events","html_url":"https://github.com/ctuning/ck/issues/67","id":182549045,"number":67,"title":"Use sort keys in compile_deps to specify linking order of libraries","user":{"login":"michel-steuwer","id":1250337,"avatar_url":"https://avatars.githubusercontent.com/u/1250337?v=3","gravatar_id":"","url":"https://api.github.com/users/michel-steuwer","html_url":"https://github.com/michel-steuwer","followers_url":"https://api.github.com/users/michel-steuwer/followers","following_url":"https://api.github.com/users/michel-steuwer/following{/other_user}","gists_url":"https://api.github.com/users/michel-steuwer/gists{/gist_id}","starred_url":"https://api.github.com/users/michel-steuwer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michel-steuwer/subscriptions","organizations_url":"https://api.github.com/users/michel-steuwer/orgs","repos_url":"https://api.github.com/users/michel-steuwer/repos","events_url":"https://api.github.com/users/michel-steuwer/events{/privacy}","received_events_url":"https://api.github.com/users/michel-steuwer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ctuning/ck/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ctuning/ck/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-12T14:59:55Z","updated_at":"2016-10-12T15:48:35Z","closed_at":"2016-10-12T15:47:02Z","body":"**Problem:** Currently, the linking order of libraries specified as dependencies via `compile_deps` can't be specified.\r\n\r\n**Proposed Solution:** The `sort` key could be used as an indication of linking order.\r\n\r\n**Example:** Given this `.cm/meta.json` snippet from https://github.com/michel-steuwer/gemmbench\r\n```\r\n  \"compile_deps\": {\r\n    \"compiler\": {\r\n      \"local\": \"yes\", \r\n      \"name\": \"C++ compiler\", \r\n      \"sort\": 10, \r\n      \"tags\": \"compiler,lang-cpp\"\r\n    }, \r\n    \"lib-opencl\": {\r\n      \"local\": \"yes\", \r\n      \"name\": \"OpenCL library\", \r\n      \"sort\": 15, \r\n      \"tags\": \"lib,opencl\"\r\n    },\r\n    \"lib-clblast-mali-overlay\": {\r\n      \"add_to_path\": \"yes\", \r\n      \"local\": \"yes\", \r\n      \"name\": \"CLBlast library (Mali overlay)\", \r\n      \"sort\": 20, \r\n      \"tags\": \"lib,clblast,vmali-overlay\"\r\n    }, \r\n    \"lib-clblast\": {\r\n      \"local\": \"yes\",\r\n      \"name\": \"CLBlast library (development)\",\r\n      \"sort\": 30,\r\n      \"tags\": \"lib,clblast,vdev\"\r\n    }\r\n  }, \r\n```\r\nI would expect the linking order to be `-lOpenCL -lclblast_mali -lclblast` where currently I get `-lclblast -lOpenCL-lclblast_mali`, as seen here:\r\n```\r\ng++-6    client.o utilities.o xgemm.o  -o clblast_client_xgemm.out    -L/home/michel/CK_TOOLS/lib-clblast-development-gcc-6.2.0-linux-32/lib -lclblast  -L/usr/share/OpenCL/r10p0-00rel0 -lOpenCL  -L/home/michel/CK_TOOLS/lib-clblast-mali-overlay-gcc-6.2.0-linux-32/lib -lclblast_mali -lm \r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ctuning/ck/issues/comments/253253150","html_url":"https://github.com/ctuning/ck/issues/67#issuecomment-253253150","issue_url":"https://api.github.com/repos/ctuning/ck/issues/67","id":253253150,"user":{"login":"gfursin","id":7384805,"avatar_url":"https://avatars.githubusercontent.com/u/7384805?v=3","gravatar_id":"","url":"https://api.github.com/users/gfursin","html_url":"https://github.com/gfursin","followers_url":"https://api.github.com/users/gfursin/followers","following_url":"https://api.github.com/users/gfursin/following{/other_user}","gists_url":"https://api.github.com/users/gfursin/gists{/gist_id}","starred_url":"https://api.github.com/users/gfursin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfursin/subscriptions","organizations_url":"https://api.github.com/users/gfursin/orgs","repos_url":"https://api.github.com/users/gfursin/repos","events_url":"https://api.github.com/users/gfursin/events{/privacy}","received_events_url":"https://api.github.com/users/gfursin/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T15:48:35Z","updated_at":"2016-10-12T15:48:35Z","body":"Cool! I repaid my Barcelona beer ;) ..."}}
{"actor":{"display_login":"gfursin"}}